Search code examples
entity-frameworkentity-framework-coreef-core-2.0ef-core-2.2entity-framework-core-2.2

How combine Repository Pattern and UoW


Im starting to prove EF-Core 2 and I read about Unit of Work and Repository pattern.Im trying to do a DB project Code First and I have 3 entities(Users,roducts and Providers), how I can apply repository pattern and unit of work in my project cause I dont know how to combine them in the same project,someone cna help me?


Solution

  • here is a microsoft link explaning how to do it https://learn.microsoft.com/en-us/aspnet/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