This is by design, since having a DTO write back to e.g. a domain model would (among other things) take away its immutability, and is often considered an anti-pattern.
这需要通过设计完成,因为让DTO回写到,比方说:域模型或其他东西,就会更改它的持久性,同时人们也认为它是反模式的。
One of the earlier design decisions we have encountered in the initial model is whether it is better to swap the positioning of the industry layer and the business domain layer.
我们在初始模型中遇到的较早设计决策之一是将行业层和业务领域层交换一下位置是否会更好。
Lightweight design patterns let you loosen coupling between objects and integrate services without forcing code into business logic or the domain model.
轻量级设计模式使您可以在对象和集成服务之间进行松散耦合,而无需艰苦地编写业务逻辑或领域模型。
应用推荐