Search code examples
architecturedomain-driven-designpocoanemic-domain-modelrich-domain-model

POCO can be used as domain model


We are planning to developing a software following Domain Driven Design inspiring by the Red (EE) and Blue (VV) ddd books. The business is not that complicated. It is possible to avoid inheritances for all concrete classes. The goal is to feel the importance of Domain Model. So is it OK to use POCO classes which will be inherited from Entity? Or It will be better to create the domain model and use DTO or repository to transfer values to domain model?


Solution

  • If your goal is to "experience" DDD, then you should probably create domain objects instead of relying on Entities.

    This is especially true if you are looking to extend any learnings from this process into other code bases that are more complex and can't take this shortcut.