Monday 4 November 2013

Repository and Unit of Work Design Pattern

1.       Repository pattern expose the underlying data source as the in-memory collection and relieves the business logic layer form the underlying details of data source. Along with Unit of work design pattern relieves business logic layer and data from the headache of Transactions, Locking, and Conflicting Updates. All things are managed behind the scenes. Different ORM solutions or Data access Libraries like Linq2Sql, N-Hibernate, ADO.NET Entity Framework, ADO.NET, and Dynamic Data provide the Unit of work mechanism. But using these Unit of work in the business logic make our BLL data source dependent. Do implement the Logical Transactions we need to implement the Unit of Work on the top of Unit of Work provided by the ORM solution.

No comments:

Post a Comment