Skip to content

Simple example for loading a DataGrid from Entity Framework Core 3x with buttons to obtain the current model instance, in this case an employee from a SQL-Server database table.

Notifications You must be signed in to change notification settings

karenpayneoregon/wpf-cs-efcore-simple

Repository files navigation

About

In this part of the series synchronous operations for reading and saving are shown.

Update 12/2020

Added conventional SqlDataReader code which is commented out yet works for view only, no CRUD actions have been coded.

Update 03/2021

Added logic for updating the current row in the DataGrid using OnRowEditEnding event.

See also

WPF Apps With The Model-View-ViewModel Design Pattern

Steps to run

  • Run script.sql from SSMS (SQL-Server Management Studio) or insides of Visual Studio.
  • Restored NuGet packages from Solution Explorer
  • Build and run the project.

Part 1 Microsoft TechNet article: WPF/Entity Framework Core primer (C#)

Part 2 Microsoft TechNet article: WPF/EF Core simple data validation (C#)

img


img

About

Simple example for loading a DataGrid from Entity Framework Core 3x with buttons to obtain the current model instance, in this case an employee from a SQL-Server database table.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published