Reputation: 5407
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.
Upvotes: 7
Views: 18163
Reputation: 28425
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
Upvotes: 19