Re: Repositories Global only or contextual?

<[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
Repository is not really a concept from your domain. That's an infrastructure concept [so that domain can make side effects ;)]
 

 While adding methods to it seems like modeling a domain - since methods have name from the domain, all it really is a glue between application and the domain.
 

 Having said that, lazy load is another story. While you could use signature to implement lazy load. since you are using Java, your signature would not look too nice (in .NET you could leverage IQueryable from LINQ - which looks much better).
 

 So, either pick a signature which can be used for lazy loading - which Set is not, or explain your requirements somewhat better, since maybe you want to call this method on repository on a later time, instead of calling it early and expecting result to materialize at a later time.
 

 Regards,
 Rikard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.