Hi everyone,
I’m coming from a Windows Forms background where I used EDMX (Entity Data Model) to map my SQL Server database.
I really liked how I could easily update the model from the database and get all the fields ready to use in my code whenever the DB structure changed.
Now I’m moving to WPF, and I’d like to keep the same convenience — meaning, if I modify the database, I want to be able to update a data model (like EDMX) so that my entities and properties stay in sync automatically.
I’d like to keep using Entity Framework and SQL Server, but I’m not sure what’s the best approach in WPF for this scenario.
Any suggestions or modern alternatives to EDMX that would work well in WPF?
Thanks in advance for your help!
Patrick KearnsPosted Oct 29, 2025, 7:18 PM
Hi Andy.
Id say the easiest way would be to keep EDMX, move the app to modern .NET first
If your WPF app is working nicely with EF6 + EDMX, you can pretty much just lift & shift to.NET 6/7/8 while staying on EF6. EF6.4+ runs on modern .NET, and the EDMX designer still works in VS 2022.
All you have to do is............
Retarget WPF to .NET 6/7/8 (SDK-style project).
Update EF6 to = 6.4 packages.
Keep your EDMX + T4 as-is. The designer 'Update Model from Database' keeps working.
Verify runtime behaviour (lazy loading, connection string, config) still matches where you need .
This gets you onto a supported runtime and buys you time. You can then move to EF Core later.
Let me know if you get stuck anywhere
AndyPosted Oct 29, 2025, 8:49 AM
Hi Patrick,
thanks for reply.
You’ve described my situation perfectly — I’m currently using EF6 with EDMX, partial classes, and a DbContext, exactly as you mentioned.
I’m honestly quite undecided about what to do next. Everything is already set up and working nicely with EF6, so it’s very convenient for me. But moving to .NET 6/7/8 would mean basically redoing everything from scratch, and I haven’t found a clear step-by-step guide or tutorial that shows how to properly make that transition, in WPF.
Do you have any advice or recommended resources for someone in my position?
Thank you
Patrick KearnsPosted Oct 28, 2025, 7:48 PM
If you are coming from a Windows Forms background using EDMX, then the closest modern equivalent depends mainly on whether you are staying on .NET Framework or moving to modern .NET (6, 7 or 8) for your WPF application. If you are staying on the older .NET Framework, you can actually keep using EF6 with EDMX exactly the same way as before. The “Update Model from Database” wizard still exists, it still works inside WPF, and the workflow remains identical to what you had in WinForms. That is perfectly valid if you explicitly want to maintain that familiar designer-driven experience.
if you are moving to modern WPF targeting .NET 6/7/8, then the industry-standard approach is Entity Framework Core using database-first scaffolding instead of EDMX. EF Core deliberately does not include a visual designer, but it provides a command (or Visual Studio extension via EF Core Power Tools) that can reverse-engineer your SQL Server database and generate POCO entity classes and a DbContext. If your database changes, you simply re-run the scaffold and it updates the generated entity classes to match your database again. In practice, this replaces “Update Model from Database” , just in a more code way rather than a drag and drop designer.
To replicate the same convenience you had before, EF Core Power Tools is a the recommended Visual Studio extension, as it gives you a UI that behaves much closer to the EDMX wizard. You select your database, choose the tables you want, and it scaffolds your entities with optional attributes, pluralisation rules and so on. You can safely re-run it whenever your schema changes. You simply keep your custom logic in separate partial classes so that re-scaffolding never overwrites your own code.
Either way, WPF works fine with Entity Framework ,the main difference is just whether you remain on EF6 with EDMX or adopt EF Core. If long-term maintainability, performance and support matter, EF Core is strongly recommended. It is the current and future direction of Microsoft’s data stack. If you choose EF Core, the “database drives the code, and I update entities when the database changes” workflow still exists, it is just done via
dotnet ef dbcontext scaffoldor the EF Core Power Tools GUI instead of EDMX.