The purpose of providing a .NET Standard 2.1 version of EF6 is understood to be to assist the upgrading of existing projects in stages.
So we have an existing solution that consists of websites, a windows service and console apps. We are in the process of upgrading it from .NET Framework to .NET Core.
It would be preferable to get it all working again in .NET Core but while still using the .NET Standard 2.1 version of EF6 for now.
The EF6 model derives from IdentityDbContext so as to contain the identity store of users, roles etc.
public class DbContextTasking : IdentityDbContext<AspNetUser, AspNetRole, string, AspNetUserLogin, AspNetUserRole, AspNetUserClaim>
All the code is now in either .NET Core or .NET Standard assemblies.
The upgraded windows service and console apps essentially work, however we are struggling with the websites.
Although of concern is that in order for the datalayer assembly to compile a number of packageReferences are necessary that show yellow triangle warnings in solution explorer :
<PackageReference Include="Microsoft.AspNet.Identity.EntityFramework" Version="2.2.3" />
"Package x was restored using .NET Framework 4.6.1 .... This package may not be fully compatible ..."
Ignoring these warnings for now, the show stopper is understanding how to get a ASP.NET Core website with identity, authentication and authorization wired up to use EF6.
For example, examples showing EF Core usage have in their ConfigureServices function :
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
However '.UseSqlServer' comes from the assembly Microsoft.EntityFrameworkCore.SqlServer
And also with :
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<DbContextTasking>()
.AddDefaultTokenProviders();
AddEntityFrameworkStores again relates to an EF Core store.
E.g. 2
This package forms the bridge between ASP.NET Core and the identity infrastructure :
Microsoft.AspNetCore.Identity.EntityFrameworkCore
So one would think that to have EF6 working with ASP.NET Core there would need to be a package similar in nature (made up name) of Microsoft.AspNetCore.Identity.EntityFramework6
If it is possible to use EF6.4 (inc. identity related tables) in conjunction with ASP.NET Core, please can you point to an example that achieve this?
Or if you know for a fact that this combination is definitely not possible please also let me know.