Skip to main content

Data Binding with EF Core

One runnable Wisej.NET 4 solution per module, built from the course's lesson guide, lab guide and walkthrough video. The project is the Support Desk Data Console (Customers, Agents, Categories, Tickets, TicketComments behind EF Core 10 + SQLite). The modules are cumulative, and Module 7 is the capstone (built on Module 5). Each screen shows only what that module's lab and video build. Each folder has its own README.md (what to try, self-check answers) and a docs/ folder with the lab notes.

Requirements: .NET 10 SDK, the Wisej-4 4.1.0 NuGet package, EF Core 10.0.12 and the dotnet-ef tool. The database is a local SQLite file under SupportDesk.Web/App_Data that the host creates (and, from Module 2, migrates and seeds) at start in Development.

The modules

ModuleWhat it builds
1 · Architecture: EF Core inside a Wisej.NET appfour-project solution, AddDbContextFactory, the Microsoft DI bridge, the first async count behind a loading guard
2 · Modeling, DbContext configuration, migrationsthe five entities with Fluent API rules, delete behaviours, RowVersion, indexes, InitialCreate migration, development seed
3 · Loading data into BindingSource, grid and lookupsSearchTicketsAsync (no-tracking projection, filters, paging in SQL), grid bound through a BindingSource, lookup ComboBoxes, Search / Next / Previous
4 · Two-way binding and CRUD editorsTicketEditModel, modal TicketEditorForm with DataBindings, save / cancel / delete, grid refresh on DialogResult.OK
5 · Validation, ErrorProvider and feedbackDataAnnotations, TicketValidator, ErrorProvider + summary label, Save disabled while invalid, DbUpdateException → friendly message, negative tests
6 · Async loads, related data and performanceEF Core logging, projection + AsNoTracking + paging of 50, related data by filtered read and explicit load, before/after notes
7 · Concurrency, deployment, diagnostics, capstoneRowVersion round trip, two-session conflict → ConflictDialog (Reload / Overwrite by role), migration script, deployment notes, capstone review

Run any module from its SupportDesk.Web project folder. The web project multi-targets net10.0-windows and net10.0, so dotnet run needs a framework:

cd "LearnWisej-Samples/Data Binding with EF Core Course/Module 3/SupportDesk.Web"
dotnet run -f net10.0 --urls http://localhost:5403

or open SupportDesk.slnx in the module folder with Visual Studio and press F5. Tests: dotnet test SupportDesk.Tests from the module folder (xunit, SQLite in memory).