2016-10-04 111 views
4

我在使用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

感謝

回答

0

好像你已覆蓋Id的默認數據類型ApplicationUser和IdentityRole。

嘗試AddEntityFrameworkStores<ApplicationDbContext, int>(),或者您覆蓋的類型。

相關問題