C
C#10mo ago
Młody G

Entity framework core - database

I created a database in ASP.NET Core (MVC) using Entity Framework Core. The ASP.NET Core application I created is only used to display the contents of the database. Now I want to create a WPF application that will allow adding records to the database. How can I connect the existing database to the WPF application? Do I need to recreate migrations? I use mssql
3 Replies
Jimmacle
Jimmacle10mo ago
i would move the EFC related code (context, models) to a separate project and reference it from your MVC app and WPF app
Młody G
Młody GOP10mo ago
Thank you for you respond, but i decided to create wpf as UI and web api. That is much better i think than connect wpf to database.
Jimmacle
Jimmacle10mo ago
yes, it is generally better for one application to "own" the database and control how the data can be accessed
Want results from more Discord servers?
Add your server