Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • In general, aggregate root is the only reference that is passed around. In DDD other entities without aggregate root aren't referable in business. it also means whenever you load/retrieve an information from persistence layer, you should have a way to map it to the aggregate root. Commented Jun 7, 2021 at 16:00
  • Aggregates are the basic element of transfer of data storage - you request to load or save whole aggregates. Transactions should not cross aggregate boundaries. You can refer to more documentation here martinfowler.com/bliki/DDD_Aggregate.html Commented Jun 7, 2021 at 16:04
  • Related: Which layer do DDD Repositories belong to? Commented Jun 7, 2021 at 16:06
  • See also: How does “Composition Root” DI apply to Domain Driven Design?. In short, the "Composition Root" is the place where a concrete repository gets instantiated. Commented Jun 7, 2021 at 16:10
  • Worth to note - Repository Pattern usually uses other methods - read: other patterns - to do a lot of the work. You rarely can use a single pattern alone in a vacuum. Most often than not, they are mashed up and combined with other patterns to get a bigger job done. So, it's fairly usual that you see a lot of people implementing Reps on very different manners. Commented Jun 9, 2021 at 15:20