7

I've just changed to the new ASP.NET 5 platform. I use visual studio code as my default IDE, and DNX for execution. .NET Core is now by default but I need to switch to .NET Framework always I want to reference the System.Data.Entity namespace or the TodoContext class.

Is there anyway to use EF in .NET Core?

This is what I'm doing now. enter image description here

3
  • Some (or all) of Entity Framework moved out of System.Data and into NuGet packages. Commented May 10, 2015 at 23:01
  • You shouldn't use Asp.Net 5 for any public applications at this point. It does not have a Go Live license yet, and ONLY Entity Framework 7 is supported, which is still in Beta state. github.com/aspnet/EntityFramework/releases/tag/7.0.0-beta4 Commented May 10, 2015 at 23:24
  • I'm totally agree with you @Claies, I'm just gathering info for a future migration... Thanks. Commented May 10, 2015 at 23:43

1 Answer 1

19

The EntityFramework in System.Data is version 6. If you want to use .NET Core then you need to switch to EF 7 which no longer lives in System.Data but in the EntityFramework.* nuget packages.

Here is an example: https://github.com/aspnet/MusicStore/blob/master/src/MusicStore/project.json#L15

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

3 Comments

.NET Core RTM does support EF6. Not sure when EF6 support was added but it's there now. Tutorial here.
@David ASP.NET Core is not .NET Core. That link is about ASP.NET Core running on the full desktop .NET Framework.
That link is broken

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.