Although I have been developing domain names (DDDs) for a long time, I am relatively new to Entity Framework (EF), and one question that came to my mind when using the Entity Framework constructor in Visual Studio was how aggregations should be presented / modeled in ef.
In accordance with the DDD best practices, entities should refer only to other objects (or value objects) within the same aggregate, and references to other entities are limited to the root objects of aggregates (aggregate roots). However, I do not see any of these concepts present in EF (i.e., all Entities are treated the same way and therefore no restrictions apply to links between Entities).
So I ask: Am I missing something in EF or is it completely agnostic regarding aggregates, aggregate roots and references between Entities? . If the latter is the case, how do you model Aggregates using the Entity Framework?
source
share