This no longer works with ASP.Net Core 3.1 / .Net Core 3.1
https://stackoverflow.com/a/37173202/1698480
Compile error:'IdentityBuilder' does not contain a definition for 'AddEntityFrameworkStores' and no accessible extension method 'AddEntityFrameworkStores' accepting a first argument of type 'IdentityBuilder' could be found (are you missing a using directive or an assembly reference?) WebSite.Site C:\WorkSource....\Startup.cs 32 Active
public class ApplicationUser : IdentityUser<Guid> { }
public class Role : IdentityRole<Guid> { }
public class ApplicationDbContext : IdentityDbContext<ApplicationUser, Role, Guid>
{
...
}
public class Startup
{
...
public void ConfigureServices(IServiceCollection services)
{
services.AddIdentity<ApplicationUser, Role>()
.AddEntityFrameworkStores<ApplicationDbContext, Guid>()
.AddDefaultTokenProviders()
.AddUserStore<UserStore<ApplicationUser, Role, ApplicationDbContext, Guid>>()
.AddRoleStore<RoleStore<Role, ApplicationDbContext, Guid>>();
}
}
If I just remove the Guid generic arg like this:
.AddEntityFrameworkStores<ApplicationDbContext, Guid>()
then I get browser error: This localhost page can’t be foundNo webpage was found for the web address: http://localhost:50827/Account/Login?ReturnUrl=%2F
How can I do this? thanks