9

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

1
  • You can't use .NET >=4.5 libraries in a .NET Core application. You have to target .NET Framework >=4.5. That being said, no you can't run it natively on linux or macOS. You could though use most of the features when you run it on mono on macos/linux, but that's another story. Think twice if you need all features of EF6 or if the features implemented in EFCore are suitable for your use case Commented May 3, 2017 at 2:15

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This is no longer true. From EF6.3 and forward, .net core(3) is supported.
0

Disclaimer: I'm the owner of the project Entity Framework Classic

That's not possible directly Entity Framework as @Adailson answered

However, it's possible via EF Classic: http://entityframework-classic.net/

That's an EF6 fork that also supports .NET Core. We plan to integrate a ton of features & bug fix.

A community (FREE) and enterprise version (PAID) is available.

What's EF Classic

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.