I have been reading about .NET Core and ASP.NET Core and Entity Framework 6.
It states
The recommended way to use Entity Framework 6 in an ASP.NET Core application is to put the EF6 context and model classes in a class library project that targets the full framework. Add a reference to the class library from the ASP.NET Core project.
However, when I actually do the following.
- Create a console application based on .NET Core
- Create Class library based on the .NET full framework.
- In the class library, add EDMX and link it with a SQL database.
- Refer to the class library in the .NET Core application.
It will not let me compile with the following error:
The Type DbSet is defined in an assembly that is not referenced.
This means I have to add an ADO.NET Entity Framework reference to the console application, but it will not allow me to as a .NET Core application does not support the full Entity Framework.
Surely, I am missing something or getting the post mentioned above wrong.
What is the issue?