I have couple of questions regarding how to use ADO.NET entity data model (.edmx) in ASP.NET MVC core 1.0 application-
As we are migrating application from MVC 5 to MVC core 1.0, how do we migrate .edmx from MVC5 application developed in VS2013 to MVC core 1.0 new VS2015?
How do I create new ADO.NET entity data model (.edmx) using Database First approach in MVC core 1.0 application in VS2015? [I have already tried creating POCO model and then use scaffold migration command, but want to understand using old wizard approach]
ADO.NET entity data model (.edmx) is not supported in Entity Framework Core. Microsoft explained here how to port it.
The closest you can come to porting is to create the model in another project,then copy those files into your .NET core application. This will only work if you have chosen a core application that references the previous Frameworks (4.61, 4.52, etc.) When you copy in the EDMX and associated files, you must make sure that they go into the same project as the .Net core application. (If you reference from another project, you will encounter Visual Studio build errors saying that the EntityFramework.dll can't be accessed. ). After copying in the files, add in EntityFramework from Nuget to fix your dbContext and DbSet references. Here is a good article about how to set up the dependency injection in .Net core for EF6:Tony Sneed Blog
As the other answers have alluded to, there is no support for EDMX. You will need to regenerate your ED models from the data using the new dotnet scaffold
command line utility. You can also use that command to scaffold incremental changes to the database.
Check out the documentation for "dotnet" (you might also be interested in migrations` once you move away from EDMX).
来源:https://stackoverflow.com/questions/38684368/ado-net-entity-data-model-edmx-in-asp-net-mvc-core-1-0