One of the major structural patterns encountered in DDD (and one of the most argued about) is the Repository pattern . You’ve created a persistent domain model, and now you need to be able to retrieve these objects from an encapsulated store. In Fowler’s PoEAA, the Repository pattern is described as: Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects . In many DDD implementations, the use of a Repository is widened to go beyond retrieval, but the other pieces in the CRUD acronym. This is natural, as a Repository provides a centralized facade over some backing store, whether that backing store is a database, XML, SOAP, REST and so on. But what about the actual interface of the Repository? What kinds of options do we have for designing the actual Repository itself? There are quite a few different schools of thought here, each with their own benefits and drawbacks. The Generic Repository Interface In the generic repository interface, the interface definition itself is generic, with implementations for individual entity types. The generic type parameter denotes the entity type of the repository. One example is in S#arp Architecture...