How to add data to database from a form using EF Core
I been stuck trying to add data from a form to fill into the database and then refresh the data grid to display the new added data. As the Projets
entity have other entities IDs as foreign keys to get data, I defined the combo boxes to have two values, a visible and hidden value. When the visible item is selected I want to use the hidden value to populate the Projets
Table after clicking on the add button and display new values in the data grid. I would appreciate any help.
Here are the necessary codes to fix the issue.
How to add data to database from a form using EFCore
I been stuck trying to add data from a form to fill into the database and then refresh the data grid to display the new added data. As the Projets
entity have other entities IDs as foreign keys to get data, I defined the combo boxes to have two values, a visible and hidden value. When the visible item is selected I want to use the hidden value to populate the Projets
Table after clicking on the add button and display new values in the data grid. I would appreciate any help.
Here are the necessary codes to fix the issue:
The ProjetsView.xaml.cs
: