Using Entity Framework 6 in ASP.NET Core

asp.net-core, entity-framework-6

Solution

It will be not possible. The same link you provided confirm that:

To use Entity Framework 6, your project has to compile against .NET Framework, as Entity Framework 6 does not support .NET Core. If you need cross-platform features you will need to upgrade to Entity Framework Core.

You can use ASP.NET Core upon .NET Framework (Not .NET CORE) and EF6 (But not cross-platform). But not ASP.NET Core upon .NET Core and use EF6. You will need to use EF Core for that project.

Problem

Let's say I have: - ASP.NET Core stand alone Web API project for .NET Core framework - Class Library with EF6 data model for full .NET framework The ASP.NET Core project refers to the class library This architecture proposed here: https://learn.microsoft.com/en-us/aspnet/core/data/entity-framework-6 The question is: will my standalone application be able to execute on the specified target platform (Win, Linux, Mac runtime) after Release (or Publish), if it's dependency targets to full .NET Framework? Thanks very much

Original source