ASP.NET Core EF6 Identity
问题描述:
我在使用EF6作为ORM的ASP.NET Core中创建一个新项目 - Note note EF Core。ASP.NET Core EF6 Identity
我在尝试配置身份存储时遇到问题。
这是我到目前为止有:
Startup.cs
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
此行令我头痛。 AddEntityFrameworkStores是EF核心,而不是EF的完整版本6.
我如何引用底层数据存储为EF6
感谢
答
好像你已覆盖Id的默认数据类型ApplicationUser和IdentityRole。
尝试AddEntityFrameworkStores<ApplicationDbContext, int>()
,或者您覆盖的类型。