title: How do you wire up a ASP.NET MVC 5 UserManager instance with Autofac?
body: <p>With the MVC 5 release comes the Asp.Net.Identity bits including the UserManager. Instantiation can get messy and I'm trying to add with Autofac controller settings.</p>
  
  <p>Controller's constructor</p>
  
  <pre><code>public LoginController(UserManager&lt;ApplicationUser&gt; userManager)
  {
      UserManager = userManager;
  }
  </code></pre>
  
  <p>Manually creating a new instance:</p>
  
  <pre><code>var controller = new LoginController(UserManager&lt;ApplicationUser&gt;(new ApplicationUserStore&lt;ApplicationUser&gt;(new MyDbContext())));
  </code></pre>
  
  <p>ApplicationUserStore class/constructor:</p>
  
  <pre><code>public class ApplicationUserStore&lt;TUser&gt; : IUserLoginStore&lt;TUser&gt;, IUserStore&lt;TUser&gt;, IDisposable where TUser : ApplicationUser
  
  public ApplicationUserStore(IMyDbContext context)
  {
      Context = context;
  }
  </code></pre>
  
  <p>I have new for the db context working correctly:</p>
  
  <pre><code>builder.RegisterType&lt;MyDbContext&gt;().As&lt;IMyDbContext&gt;();
  </code></pre>
  
  <p>What would be the registration signature for the LoginController?</p>