1. Create a simple MVC web app.
2. Add a basic EF code first model.
3. Add a controller based on this model.
Expected:
The auto generated code for the controller uses Repository pattern to talk to the model using "Repository".
More details on repository pattern: http://msdn.microsoft.com/en-us/magazine/dd942838.aspx
Actual :
The auto generated controller manipulates on the EF DBContext classes directly.
User impact:
One of the key goals of MVC pattern is to make the coupling between model/controller and view as less as possible, making the inidvidual components unit testable. Given that, auto-generating code which has strong coupling on DBContext is not acceptable.
Looks like the "MVCScaffolding" Nuget package lets you to create controller which uses "Repository". But as a getting started user, I have no idea about this package. Also using "respository" should be available as one of the default option while creating controllers.