If you want to use the library with Entity Framework from a .Net Core application, you must redirect the application to the .NET Framework. Here is a quote from an official source :
To use Entity Framework 6, your project must compile in .NET. Framework because Entity Framework 6 does not support .NET Core. if you need cross-platform features, you will need to upgrade to the Entity Framework Core .
If you check out a sample .Net.Core project ( linked from the same document) that uses the library with EF6 (just your case), you will see that it targets the .Net Framework, not the .Net Core:
<TargetFramework>net452</TargetFramework>
With this re-hook, you will not lose any of the .Net Core functionality that you are currently using. You can still use whatever we like in .Net Core. However, you are limiting the platform on which your application can only run on the .Net Framework. Unfortunately, you currently have no workaround for this limitation, since this is because the Entity Framework is only implemented for the .NET Framework. Your options will either shift towards the Entity Framework Core, or wait until the Entity Framework becomes part of the .Net standard.
In general, to fix your current problem, change the following line in the .Net Core csproj file:
<TargetFramework>netcoreapp2.0</TargetFramework>
to
<TargetFramework>net47</TargetFramework>
CodeFuller
source share