Closed Rod-in-NM closed 2 years ago
@Rod-in-NM There are a couple of reasons for this. First, pre-core Entity Framework was designed as an object-oriented API for consumption of Entity Data Models (EDMs). EDM has a defined spec and works with XML configuration/mapping, from which EDMX are derived.
EF Core was instead designed as an object/database mapper, with a simple, straightforward, and extensible metadata model not constrained by EDM. Therefore, there is no EDM in EF Core from which to create an EDMX.
Second, EDMX is horrible. It's very difficult to understand or modify without tooling. Even with tooling, it's a pain. Code-based modeling is generally much easier to work with. Likewise, it's much easier to work with a model that doesn't split things across three conceptual areas (C/S/M) where changes to one area require equivalent, but non-obvious, changes to the others.
I know that Microsoft decided years ago to not continue using the EDMX file, preferring the code first or code first with existing database approach. I love that approach much better, than using a .EDMX file. But I've never seen why that decision was made. Why was the .EDMX file dropped?
Where I work, they use .EDMX files exclusively. I think it's because they just don't know there's an alternative.
Although I've used the code first approach in other jobs, I've only recently started to do that where I work now. I ran into a problem with a .EDMX file not working at all. I spent a week trying to get it to work, but eventually scraped it in favor of the code first approach. I'd like to know what the Entity Framework teams reason(s) were for dropping the .EDMX file, please.