title: UserManager throws exception - Unable to track an entity because primary key property 'Id' is null - after upgrading from .Net Core 2.2 to 3.0
body: <p>I've used the custom implementation of <code>User</code> which is derivated from <code>IdentityUser</code> using <code>Asp.Net Core Identity</code>:</p>
  
  <pre><code>public class AppUser : IdentityUser
      {
          ...
      }
  </code></pre>
  
  <p>If I call the method:</p>
  
  <pre><code>var identityResult = await UserManager.CreateAsync(user);
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: Unable to track an entity of type 'AppUser' because primary key property 'Id' is null.</p>
  </blockquote>
  
  <p>It works perfectly with version of <code>Microsoft.AspNetCore.Identity.EntityFrameworkCore</code> - <code>2.2.0</code>, but after upgrading to <code>3.0.0</code> - it doesn't work.</p>
  
  <p>I get same error during testing of the creation of user as well, there I use following <code>UserManager</code> configuration:</p>
  
  <p><a href="https://github.com/aspnet/AspNetCore/blob/c95ee2b051814b787b07f55ff224d03d550aafeb/src/Identity/test/Shared/MockHelpers.cs#L37" rel="noreferrer">https://github.com/aspnet/AspNetCore/blob/c95ee2b051814b787b07f55ff224d03d550aafeb/src/Identity/test/Shared/MockHelpers.cs#L37</a></p>