title: asp.net 5 / Core Identity Customisation Issues - No Implicit Reference Conversion error
body: <p>So I've been looking at this for several hours now and i'm starting to lose the little hair I have left on it...</p>
  <p>I'm testing this on an entirely new website. No worries about dropping tables etc.</p>
  <p>I'm using Asp.net 5 / Core with the Identity tools to handle user registration, roles etc.</p>
  <p>I want to customise the IdentityUser class to include a few custom fields, like displayname, and description, plus some references to other tables. (E.g. Users will create a Galleries of images, so the gallery table will have a foreign key to the UserId.)</p>
  <p>However, following various tutorials online, (<a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/customize-identity-model?view=aspnetcore-5.0" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/security/authentication/customize-identity-model?view=aspnetcore-5.0</a>) I am advised to do the following:</p>
  <p>Create a new class for a user with my custom fields, and inherit from the IdentityUser, e.g. UserAccount : IdentityUser.</p>
  <pre><code>public class UserAccount : IdentityUser
  {
      [Required, MaxLength(50)]
      public string DisplayName { get; set; }
  
      [MaxLength(512)]
      public string Description { get; set; }
  </code></pre>
  <p>Update the ApplicationDbContext, to inherit from IdentityDbContext&lt;<strong>NewUserClass</strong>&gt;</p>
  <p><a href="https://i.stack.imgur.com/ZmCyY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZmCyY.png" alt="enter image description here" /></a></p>
  <p>I just keep getting the following error:
  Error   CS0311  The type '...UserData.UserAccount' cannot be used as type parameter 'TUser' in the generic type or method 'IdentityDbContext'. There is no implicit reference conversion from '....UserData.UserAccount' to 'Microsoft.AspNetCore.Identity.IdentityUser'.</p>
  <p>What am I missing here?? None of the tutorials seem to have this casting issue.</p>