Mar 22, 2016 07:55 AM|Mikesdotnetting|LINK
The business layer talks to the repository layer, which talks to the data access layer. So the Business layer asks the repository for a List<Product>. The repository layer will obtain the raw data from the data access layer (which talks directly to the data
store - typically a relational database) and transform it into List<Product> that the Business layer wants.
The best way in my opinion to implement the Repository pattern to take full advantage of the benefits you mentioned is to use an ORM like Entity Framework. EF itself forms both the repository and data access layers and will save you a huge amount of time
in writing code. Otherwise, what you will end up writing will look very much like a poor man's version of Entity Framework, where you will use DataReaders in your DAL to get data from the database, and Reflection to bind the values to properties on classes.
Then you will need to write additional code to map properties to database tables and columns where you don't want to use the database field names as property names. Plus you will need to write a caching infrastructure which is already part of EF.