How to plan migration from EF 6 with EDMX to EF Core
09:02 28 Jun 2024

We have a pretty complex .EDMX in EF 6.0 which was designed using database-first approach (against SQL Server) back in 2014.

It uses lot of features of EF like TPT, TPC, TPH, entity splitting, custom T4 templates as well along with inheritance, abstraction etc. We have stored procedures, views, even CLR functions (for regex) at some places.

Schema do have 1-1 relationships, 1-N, N-N etc with OOP concepts down at database level even.

This eventually gets used into ASP.NET Web API (not .NET Core) and API gets consumed in WPF, Winforms, Windows services etc.

When I tried porting the API to .NET Core, it was simple. However it did fail when connecting to database with a SqlClient error which is forcing me to upgrade to EF Core.

Scaffolding looks quite messed up with so many entities being generated without any relationships properly defined. Is there a tool or something that can read my existing .edmx file and generate fluent version for the same?

I have already tried EF Core Power Tools. It doesn't seems to be a job of a day or 2 and it looks like a month long job.

Any shortcuts?

entity-framework entity-framework-core refactoring