Project Description
UnitOfWork is complete pattern consist of Repositories. Beginning for Entity Framework. You don't need to write it oneself. Now you only need to create model in entity framework and thanks for UnitOfWork library you have immediatelly and automatically Unit of Work pattern in app.


What is Unit of Work pattern? I think that very good and comprehencive explanation you can find here:
http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application


Generally, repository and unit of work patterns are intended to create an abstraction layer between the data access and the business logic layers of an application. These patterns can help insulate your application from changes in the data store and can facilitate automated unit testing or test-driven development (TDD).
When I wrote this in my projects second time I thought - 'what for I implement this again? Of course, my experience is better from project to project so I write it better now, but why not implement project-independent library?'. And this is why I wrote my library and I hope it will be usefull for more society.

In UnitOfWork library repositories is hidden for client. Unit of work use it but for us only UoW is useful. Mainly part in library is interface - IUnitOfWork. This is main abstraction level. Thanks for this we can make test using mock tools for IUnitOfWork and use Dependency Injection in project. At first library include only one implementation of this interface - EFUnitOfWork. This mean implementation for Entity Framework. Firstly Entity Framework is actually most popular DB access mechanism and secondly I need it for EF. But if few people send me demand for other db access framework, api then I surely add it.

For more information about using UnitOfWork library read documentation.

Last edited Dec 3, 2011 at 8:54 PM by krzysiekfonal, version 4