Programming, Technology »

Sunday, October 9, 2011 | 2 Comments

Last week I have been breaking my head on how to effectively apply the repository pattern? There are a lot of different implementations on the web each with different pros and cons. In the most well-known definition it should encapsulate the business entities from the underlying data infrastructure. Most of the time it sits on top of a data mapping layer which is responsible for mapping your tables to the right classes, usually called entities. I came across implementations that support CRUD or are just read-only, some are generic, some use a query object pattern, some use the specification pattern, some use LINQ expressions, some support unit of work, some expose the IQueryable<T> interface and some encapsulate advanced queries... [More]