title: Asp.net identity context is not mapping without custom classes
body: <p>So, I have changed my application so that I may use an integer primary key on my tables (a horrid process by the way).  Everything works fine.  Consider my <code>ApplicationDbContext</code> class:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser, CustomRole, int, CustomUserLogin, CustomUserRole, CustomUserClaim&gt;, IIDentityContext
  {
      public ApplicationDbContext()
          : base("OwinTestDefault")
      {
          Database.SetInitializer&lt;ApplicationDbContext&gt;(null);
      }
      ...
  }
  </code></pre>
  
  <p>Now consider, for example, my user login class here, in its entirety:</p>
  
  <pre><code>public class CustomUserLogin : IdentityUserLogin&lt;int&gt;
  {
  }
  </code></pre>
  
  <p>It seemed silly to have to make a class just for this, and that I should be able to just replace any instance of this with <code>IdentityuserLogin&lt;int&gt;</code> in the code, resulting in this now:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser, CustomRole, int, IdentityUserLogin&lt;int&gt;, CustomUserRole, CustomUserClaim&gt;, IIDentityContext
  {
      public ApplicationDbContext()
          : base("OwinTestDefault")
      {
          Database.SetInitializer&lt;ApplicationDbContext&gt;(null);
      }
      ...
  }
  </code></pre>
  
  <p>However, bafflingly, it now doesn't work and throws the error:</p>
  
  <blockquote>
    <p>The type     'Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin`1[System.Int32]' was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive or generic, and does not inherit from EntityObject.`</p>
  </blockquote>
  
  <p>Searching around, some people have run into this when they have changed their table names, but I have not done this, and regardless, overriding OnModelCreating and explicitly mapping everything I can (table name, keys, column names and properties) has no effect and it still complains it isn't mapped.  Plus, looking at the source code of the base classes on GitHub, the mapping should be fine anyways.</p>
  
  <p>Any ideas?</p>