I\'ve been confused by what I\'ve been reading during my research on the repository pattern. I\'m wondering if folks are (incorrectly?) using that word when they simply mean a d
Take a look at the "Using the IQueryable interface" section and beyond at Extending and Enhancing the Orders and Registrations Bounded Context. It provides an insightful and balanced discussion of DAO/Repository implementations.
As subsequently highlighted by Bob Horn, the Persistence Patterns articles summarises that:
Basically, the Repository pattern just means putting a façade over your persistence system so that you can shield the rest of your application code from having to know how persistence works.
In general I agree with author's statements, but I'd like to add some details
Difference between Repository and DAL/ORM that first not only abstracts the persistence mechanism, but also provides collection-like interface for accessing domain objects … and isolates domain objects from details of the database access code:
For external layers, such as Business Logic:
IEnumerable
, rather then entity-framework context or nhibernate sessionRepository contains DAL/ORM underneath and serves same purpose