Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anyway to use Entity Framework in .NET Core?

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

like image 453
Miguel Lattuada Avatar asked May 10 '15 22:05

Miguel Lattuada


1 Answers

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

like image 130
Victor Hurdugaci Avatar answered Oct 16 '22 09:10

Victor Hurdugaci