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
问题 I've used the custom implementation of User which is derivated from IdentityUser using Asp.Net Core Identity : public class AppUser : IdentityUser { ... } If I call the method: var identityResult = await UserManager.CreateAsync(user); I get the error: System.InvalidOperationException: Unable to track an entity of type 'AppUser' because primary key property 'Id' is null. It works perfectly with version of Microsoft.AspNetCore.Identity.EntityFrameworkCore - 2.2.0 , but after upgrading to 3.0.0