blazor-starter-kit icon indicating copy to clipboard operation
blazor-starter-kit copied to clipboard

Move Repository Interfaces from Application Layer to Domain Layer

Open vanasis opened this issue 3 years ago • 0 comments

Hi, Can i know your reason to put Repository layer inside of application layer? why you dont put it inside domain layer? is it possible to move it in next versions?

link: https://stackoverflow.com/questions/71996305/repository-implementation-in-application-domain-and-infrastructure-layer-ddd/72036702#72036702

The repository is the contract between the domain model and the persistence. It should be written only in terms of the Domain and without a thought to the underlying persistence. The contract of a repository is more than just a CRUD interface. It is an extension of the domain model and is written in terms that the domain expert understands. Your repository should be built from the needs of the application use cases rather than from a CRUD‐like data access standpoint

vanasis avatar Feb 13 '23 16:02 vanasis