title: AspNetCore.Identity not working with custom User/Role implementation
body: <p>Because I tend to favour <code>Guid</code> as my primary key type, my <code>User</code> and <code>Role</code> classes are implemented as follows</p>
  
  <pre><code>public class User : IdentityUser&lt;Guid, UserClaim, UserRole, UserLogin&gt;
  {
  }
  
  public class Role : IdentityRole&lt;Guid, UserRole, RoleClaim&gt;
  {
  }
  </code></pre>
  
  <p><em>Note that <code>UserClaim</code>, <code>UserRole</code>, <code>UserLogin</code> &amp; <code>RoleClaim</code> are all implemented in the same manner</em></p>
  
  <p>Here is my <code>DbContext</code> implementation</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;User, Role, Guid, UserClaim, UserRole, UserLogin, RoleClaim, UserToken&gt;
  {
  }
  </code></pre>
  
  <p>All good so far, except AspNetCore's new DI container doesn't seem to like my custom implementation by default. The following line of code, from my Startup.cs file throws the error shown below</p>
  
  <pre><code>services
      .AddIdentity&lt;User, Role&gt;()
      .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
      .AddDefaultTokenProviders();
  </code></pre>
  
  <blockquote>
    <p>GenericArguments[0], 'NewCo.DomainModel.Models.Identity.User', on
    'Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore`4[TUser,TRole,TContext,TKey]'
    violates the constraint of type 'TUser'.</p>
  </blockquote>
  
  <p>I am assuming that this is because the default Identity gremlin is implemented to use <code>IdentityUser&lt;string&gt;</code>, where I'm using <code>IdentityUser&lt;Guid&gt;</code>.</p>
  
  <p>What do I do next? <em>(I'm all outta ideas)</em></p>
  
  <p><em>Note: I'm building against Microsoft's official .NET Core and ASP.NET Core releases as of Monday (June 27th, 2016) and Visual Studio Update 3 (if that's of any help to anyone)</em></p>