How to create Repository Classes in MVC3 (Entity Framework)?
I created a project using MVC3 - Entity Framework. I like to useRepository Pattern together with it. I am new to repository pattern. Do I need to createONE EACH Repository for each Model Class (classes which represent each table in the database) and within each repository do I have to writeall the functions which will Insert, Update, Delete and Fetch record?
Posted Jul 2, 2013, 5:49 AM
If you want, you can implement unit of work pattern for CRUD opetions.
Please read thru some of the existing applications.
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
http://pigg.codeplex.com/
http://efrepositorypattern.codeplex.com/
http://cartrackr.codeplex.com/