AspNet Core MVC + Class Library (.Net Standard) with Entity Framework

asp.net-core-mvc entity-framework-core visual-studio-2017

Question

I'm using Visual Studio 2017 and I'm building my first Asp.Net Core MVC site and I want to create also a Class Library (.Net Standard) as My Data Access Layer. In this last library I want to use Entity Framework to connect to my database. I tried to use Entity Framework Core but I don't know how to create an EDMX file to map my database. Is there another way to do this with Entity Framework Core?

Thanks in advance for your help :)

1
3
7/25/2017 2:26:01 PM

Popular Answer

Entity framework has the power to the point that you may consider not explicitly mapping any of your database at first. Entity framework does most of the mapping for you.

I was in the same boat as you about a year ago and I got a lot of help from this example. It is the Contoso University Example: https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

0
7/25/2017 2:46:44 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow