Chapter 12
Dependency Injection
What's In This Chapter?
As of version 3, ASP.NET MVC has included a dependency resolver that dramatically improves the ability of an application to participate in dependency injection for both services consumed by MVC and commonly created classes like controllers and view pages.
To understand how the dependency resolver works, we first need to define some of the common software patterns that it uses. If you're already familiar with patterns like service location and dependency injection, you may want to skim or skip the next section and go directly to the “Dependency Resolution in MVC” section.