title: Why is MVC4 using the Service Locator Anti-Pattern?
body: <p>After reading <a href="https://rads.stackoverflow.com/amzn/click/com/1935182501" rel="noreferrer" rel="nofollow noreferrer">"Dependency Injection in .NET"</a> by Mark Seemann I stay away from the <a href="http://en.wikipedia.org/wiki/Service_locator_pattern" rel="noreferrer">Service Locator</a> which is an anti-pattern. </p>
  
  <p>Upon reading <a href="http://www.asp.net/whitepapers/mvc4-release-notes#_Toc317096197" rel="noreferrer">the release notes on MVC 4</a> I see:</p>
  
  <blockquote>
    <p>Improved Inversion of Control (IoC) via DependencyResolver: Web API
    now uses the service locator pattern implemented by MVC’s dependency
    resolver to obtain instances for many different facilities.</p>
  </blockquote>
  
  <p>Thus I'm left curious and confused why Microsoft would use a service locator in 2012. </p>