User-2057865890 posted
Hi,Amera Tag Eldin
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).
Please refer to the following.
Implementing the Repository
and Unit of Work Patterns in an ASP.NET MVC Application
Generic Repository, Entity Framework, Unit Testing, Autofac and ASP.NET MVC
Best regards,
Chris Zhao