Following the link to POCO's definition we see that they should include only props/fields and no methods. In this article we see that domain model classes should be POCOs. Isn't that the definition of an anemic domain model?
More specifically in this page you can find the definition of a POCO. It states that:
A POCO—or a plain old class/CLR object—is a .NET data structure that contains only public properties or fields. A POCO shouldn't contain any other members, such as:
methods
events
delegates
These objects are used primarily as data transfer objects (DTOs). A pure POCO will not inherit another object, or implement an interface. It's common for POCOs to be used with serialization.
Then below Figure 7-5 we see:
which means they should include props/fields and no methods.
Following the link to POCO's definition we see that they should include only props/fields and no methods. In this article we see that domain model classes should be POCOs. Isn't that the definition of an anemic domain model?
More specifically in this page you can find the definition of a POCO. It states that:
A POCO—or a plain old class/CLR object—is a .NET data structure that contains only public properties or fields. A POCO shouldn't contain any other members, such as:
These objects are used primarily as data transfer objects (DTOs). A pure POCO will not inherit another object, or implement an interface. It's common for POCOs to be used with serialization.
Then below Figure 7-5 we see:
which means they should include props/fields and no methods.
And then we see the page:
and
from which I undestand that using POCOs for your domain models, the way POCO is defined above, results in an anemic model. That is why I am confused.
Document Details ⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: 95f3dcd7-3220-e9cf-3ca6-90b1282410ec Version Independent ID: 5a30bea5-326b-ea72-59ae-dfef1e190e4a Content: Designing a DDD-oriented microservice Content Source: docs/architecture/microservices/microservice-ddd-cqrs-patterns/ddd-oriented-microservice.md Product: dotnet-architecture Technology: microservices GitHub Login: @nishanil Microsoft Alias: nanil