Repository and Unit of Work Patterns in an ASP.NET MVC Application

The repository and unit of work patterns are intended to create an abstraction layer between the data access layer and the business logic layer of an application. Implementing these patterns can help insulate your application from changes in the data store and can facilitate automated unit testing or test-driven development (TDD).

 

The unit of work class coordinates the work of multiple repositories by creating a single database context class shared by all of them

windows-live-writer_8c4963ba1fa3_ce3b_repository_pattern_diagram_1df790d3-bdf2-4c11-9098-946ddd9cd884

https://www.asp.net/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application

 

Advertisements