Re: Repositories Global only or contextual?
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
My original point was that I don't consider repository part of the domain, but rather part of the infrastructure. I think you explained pretty well the reasoning behind that - optimization concerns should be taken care of in the infrastructure instead of leaking into the domain (well, most of the time). But most repositories suffer from infrastructure leakage - take most basic feature of paging. Paging will require additional arguments on your methods or type signature suited for such operations. Neither of those is part of your domain, but you need to have it or you will have performance issues. Regards, Rikard