I changed the project from .NET Core 1.1 to 2.0, but I get an error from Identity when it tries to add stores:
services.AddIdentity<ApplicationUser, IdentityRole<long>>() .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultTokenProviders();
Error thrown:
AddEntityFrameworkStores can only be called with a role that derives from IdentityRole
These are my classes:
public class ApplicationUser : IdentityUser<long> { } public class ApplicationDbContext : IdentityDbContext<ApplicationUser, IdentityRole<long>, long> { public ApplicationDbContext(DbContextOptions options) : base(options) { } }
Can anybody help me?
Felipe santana
source share