title: asp.net identity 2.0 unity not resolving default user store
body: <p>i get the following exception when trying to configure Unity using Unity.Mvc5 with an MVC 5 application using Identity 2.0 and the Identity 2.0 Samples boilerplate.  i have read this SO <a href="https://stackoverflow.com/questions/21927785/configure-unity-di-for-asp-net-identity">Configure Unity DI for ASP.NET Identity</a> and i'm still not clear on what i'm missing.  What am i doing wrong here?</p>
  
  <p>The current type, System.Data.Common.DbConnection, is an abstract class and cannot be constructed. Are you missing a type mapping? </p>
  
  <p>[ResolutionFailedException: Resolution of the dependency failed, type = "myApp.Web.Controllers.AccountController", name = "(none)".
  Exception occurred while: while resolving.</p>
  
  <h2>Exception is: InvalidOperationException - The current type, System.Data.Common.DbConnection, is an abstract class and cannot be constructed. Are you missing a type mapping?</h2>
  
  <p>At the time of the exception, the container was:</p>
  
  <p>Resolving myApp.Web.Controllers.AccountController,(none)
  Resolving parameter "userManager" of constructor myApp.Web.Controllers.AccountController(myApp.Web.Models.ApplicationUserManager userManager)
  Resolving myApp.Web.Models.ApplicationUserManager,(none)
  Resolving parameter "store" of constructor myApp.Web.Models.ApplicationUserManager(Microsoft.AspNet.Identity.IUserStore<code>1[[myApp.Web.DAL.Profiles.ApplicationUser, myApp.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] store)
  Resolving Microsoft.AspNet.Identity.EntityFramework.UserStore</code>1[myApp.Web.DAL.Profiles.ApplicationUser],(none) (mapped from Microsoft.AspNet.Identity.IUserStore<code>1[myApp.Web.DAL.Profiles.ApplicationUser], (none))
  Resolving parameter "context" of constructor Microsoft.AspNet.Identity.EntityFramework.UserStore</code>1[[myApp.Web.DAL.Profiles.ApplicationUser, myApp.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]](System.Data.Entity.DbContext context)
  Resolving System.Data.Entity.DbContext,(none)
  Resolving parameter "existingConnection" of constructor System.Data.Entity.DbContext(System.Data.Common.DbConnection existingConnection, System.Data.Entity.Infrastructure.DbCompiledModel model, System.Boolean contextOwnsConnection)
  Resolving System.Data.Common.DbConnection,(none)</p>
  
  <p>account controller as i have modified it</p>
  
  <pre><code> public AccountController(ApplicationUserManager userManager)
   {
        _userManager = userManager;
   }
  
   private ApplicationUserManager _userManager;
  </code></pre>
  
  <p>containers i have registered</p>
  
  <pre><code>container.RegisterType&lt;ApplicationUserManager&gt;(new HierarchicalLifetimeManager());
  container.RegisterType&lt;IUserStore&lt;ApplicationUser&gt;, UserStore&lt;ApplicationUser&gt;&gt;(new HierarchicalLifetimeManager());
  </code></pre>