Core EF6 ASP.NET Identifier

I am creating a new project in ASP.NET Core with EF6 as ORM - Notice the EF Core.

I'm having trouble setting up the Identity Store.

Here is what I still have:

Startup.cs

 services.AddIdentity<ApplicationUser, IdentityRole>()
            .AddEntityFrameworkStores<ApplicationDbContext>()
            .AddDefaultTokenProviders();

This line causes me a headache. AddEntityFrameworkStores for EF Core, not the full version of EF 6.

How can I reference the underlying data store for EF6

thank

+4
source share
1 answer

It seems that you have overridden the default data type Id for ApplicationUser and IdentityRole.

Try AddEntityFrameworkStores<ApplicationDbContext, int>()either with the type you redefined.

0
source

Source: https://habr.com/ru/post/1656690/


All Articles