Your First MVC 6 and EF 7 Application (Dependency Injection) : Part 3
In Part 1 and Part 2 of this series you developed a simple database driven application that displays a list of customers and also allows you to modify the customer details. Although the application is working as expected, it relies on the local instances of the NorthwindDbContext to get its job done. In this article we will use the Dependency Injection (DI) features of MVC 6 to inject the NorthwindDbContext into the controller class. Later we will also add repository support in the application.
http://www.binaryintellect.net/articles/57e3fdc1-1dcd-4d70-953a-a6d7906402b8.aspx