title: How do i create an instance of UserManager
body: <p>I am trying to learn how the new asp.net identity 2.0 works, but with little documentation I am hitting quite a few stumbling blocks.</p>
  
  <p>I have this code below based off of a couple of tutorials that I have read:</p>
  
  <pre><code>public class CustomRole : IdentityRole&lt;string, CustomUserRole&gt;
  {
      public CustomRole() { }
      public CustomRole(string name) { Name = name; }
  }
  
  public class CustomUserRole : IdentityUserRole&lt;string&gt; { }
  public class CustomUserClaim : IdentityUserClaim&lt;string&gt; { }
  public class CustomUserLogin : IdentityUserLogin&lt;string&gt; { }
  
  // define the application user
  public class ApplicationUser : IdentityUser&lt;string, CustomUserLogin, CustomUserRole, 
      CustomUserClaim&gt;
  {
      [Required]
      public bool IsActive { get; set; }
  
      public async Task&lt;ClaimsIdentity&gt; GenerateUserIdentityAsync(UserManager&lt;ApplicationUser&gt; manager)
      {
          // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
          var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
          // Add custom user claims here
          return userIdentity;
  
  
      }
  }
  
  public partial class myDbContext : IdentityDbContext&lt;ApplicationUser, CustomRole, string, 
      CustomUserLogin, CustomUserRole, CustomUserClaim&gt;
  {
      static myDbContext()
      {
          Database.SetInitializer&lt;myDbContext&gt;(null);
      }
  
      public myDbContext()
          : base("Name=myDbContext")
      {
      }
  
      public DbSet&lt;TestTable&gt; TestTables { get; set; }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          modelBuilder.Configurations.Add(new TestTableMap());
      }
  }
  </code></pre>
  
  <p>I then have this code:</p>
  
  <pre><code>// create the user manager
          UserManager = new UserManager&lt;ApplicationUser&gt;(new UserStore&lt;ApplicationUser, CustomRole, string, CustomUserLogin, CustomUserRole,
      CustomUserClaim&gt;(
              new myDbContext()));
  </code></pre>
  
  <p>I get an error in this statement saying the argument type <strong>UserStore&lt;-ApplicationUser, CustomRole, string, CustomUserLogin, CustomUserRole,
          CustomUserClaim-></strong> is not assignable to the parameter type <strong>IUserStore&lt;-ApplicationUser-></strong></p>
  
  <p>What am I missing here?</p>