Using Entity Framework 6 in ASP.NET Kernel

Say I have:

  • ASP.NET Core for a standalone web project API for the .NET Core platform
  • Class Library with EF6 Data Model for the Complete .NET Platform

The ASP.NET Core Project is a Class Library

This architecture is offered here:

https://docs.microsoft.com/en-us/aspnet/core/data/entity-framework-6

Question: Will my stand-alone application be able to run on the specified target platform (Win, Linux, Mac runtime) after release (or publication) if it depends on the full .NET Framework?

Thank you very much

+7
source share
2 answers

It will be impossible . The same link you provided confirms that:

To use Entity Framework 6, your project must be compiled using the .NET Framework, since Entity Framework 6 does not support .NET Core. If you need cross-platform features, you need to upgrade to the Entity Framework Core.

You can use ASP.NET Core in the .NET Framework (not .NET CORE) and EF6 (but not in cross-platform). But not ASP.NET Core on .NET Core and use EF6. You will need to use EF Core for this project.

+3
source

Disclaimer : I am the owner of the Entity Framework Classic project

This is not directly possible with the Entity Framework, as @Adailson replied.

However, this is possible through EF Classic: http://entityframework-classic.net/

This is an EF6 plug that also supports .NET Core. We plan to integrate many features and bug fixes.

Community version (FREE) and Enterprise version (PAY) available.

What is EF Classic?

Entity Framework Classic is a supported version from the latest EF6 codebase. It supports the .NET Framework and .NET Core and overcomes some of the limitations of EF by adding tons of required built-in features.

0
source

All Articles