'Add entity data model (edmx file) to .net core API

I have .Net Core 5.0 API project contains another .Net Core Class Library.

Also I have exiting SQl Server Database.

How can create edmx using .net core project with my exiting databse?

C# and VS2019



Solution 1:[1]

EF Core do not support edmx. It uses attributes and Fluent API for defining schema and mapping.

Check this link how to work with existing database with EF Core.

https://docs.microsoft.com/en-us/ef/efcore-and-ef6/porting/port-edmx

Solution 2:[2]

You cannot create an EDMX file in .NET core but you can use an existing edmx file in .NET core project. I documented the procedure here and a code sample on github. You can even generate more than entities, including an entire API

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Svyatoslav Danyliv
Solution 2 Ashirafu Miiro