【发布时间】:2017-08-16 20:50:06
【问题描述】:
我已将一个项目从 .NET Core 1.1 更改为 2.0 版本,但是当它尝试添加商店时,我从 Identity 收到错误:
services.AddIdentity<ApplicationUser, IdentityRole<long>>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
抛出的错误是:
AddEntityFrameworkStores 只能使用派生的角色调用 来自身份角色
这些是我的课程:
public class ApplicationUser : IdentityUser<long>
{
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser, IdentityRole<long>, long>
{
public ApplicationDbContext(DbContextOptions options) : base(options) {
}
}
有人可以帮助我吗?
【问题讨论】:
-
您找到解决方案了吗?
-
同样的问题,你找到解决办法了吗?
标签: asp.net-core-mvc asp.net-identity .net-core asp.net-core-2.0