我使用ASP.NET Core MVC
与EntityFramework 6
(不EF核心,因为甲骨文没有对甲骨文的支持提供EF7还)ASP.NET MVC的核心与
我无法使用AddEntityFrameworkStores身份2的EntityFramework 6(甲骨文)因为ApplicationDbContext要求是Microsoft.EntityFrameworkCore.DbContext
我没有使用的EntityFramework身份,我们是不是其他的方式,我使用Asp.NET核心身份与Oracle。
public void ConfigureServices(IServiceCollection services)
{
var a=services.AddIdentity<ApplicationUser, Microsoft.AspNet.Identity.CoreCompat.IdentityRole>();
a.AddEntityFrameworkStores<ApplicationDbContext>().AddDefaultTokenProviders();//Error Compile
}
错误CS0311类型“x.Models.ApplicationDbContext”不能在通用类型或方法“IdentityEntityFrameworkBuilderExtensions.AddEntityFrameworkStores(IdentityBuilder)”被用作类型参数“TContext”。没有从'x.Models.ApplicationDbContext'到'Microsoft.EntityFrameworkCore.DbContext'的隐式引用转换。 MPWebApplicationCore..NET框架4.5.2