title: Use named registration in autofac with MVC controller injection integration
body: <p>I have autofac set up to do dependency injection of my asp.net MVC controllers, like so:</p>
  
  <pre><code>System.Web.Mvc.DependencyResolver
                     .SetResolver(new AutofacDependencyResolver(container));
  </code></pre>
  
  <p>And it is working fine. However, I have several implementations of an interface (say, <code>IFoo</code>) that I want to register as named instances:</p>
  
  <pre><code>builder.Register&lt;Bar&gt;(c =&gt; new Bar()).Named&lt;IFoo&gt;("bar");
  builder.Register&lt;Baz&gt;(c =&gt; new Baz()).Named&lt;IFoo&gt;("baz");
  ...
  </code></pre>
  
  <p>And I have several controllers which take an <code>IFoo</code> in their constructor. But each controller needs a different concrete implementation of <code>IFoo</code>. How can I tell autofac which controller needs "bar" and which needs "baz"?</p>