Well in ASP.NET MVC4 and EF5 I used to create repositories as an abstraction layer, which holds an instance of DBContext class and apply operations such as Find, FindAll, Insert, Update, Delete, etc. The repositories usually come together with Unit of Work, which keeps track with managed domain objects and commit whenever it is asked. I have done work such as refactoring the repositories into a generic repository, and it was working very nicely too.
However, since the introduction of ASP.NET MVC5 and EF6, I havent seen such repositories around in most internet articles I find. It seems that, EF6 introduced a new feature called ApplicationDbContext, which essentially replaces repositories. I have no idea how this happens, but ApplicationDbContext does seem to be a lot more powerful than the old DbContext. Can anyone explain why Repositories are not being used in ASP.NET MVC5 with EF6 anymore? Or is it just me who dont find good examples on the web? In this case, can anyone show me a link to how to use Repositories/Unit of Work in MVC5 and EF6?
by Hall_of_Famer via /r/csharp