Start Debugging

Daily notes on .NET, C#, EF Core, MAUI, Blazor, and Flutter - for developers who ship.

How to share validation logic between server and Blazor WebAssembly
The single biggest source of validation drift in a Blazor WebAssembly + ASP.NET Core app is the urge to write the rules twice. This guide walks the only layout that scales in .NET 11: a Shared class library that owns the DTOs and their validators, consumed by both the WASM client (EditForm + DataAnnotationsValidator or Blazored.FluentValidation) and the server (minimal API endpoint filter or MVC model binding), with a tested round-trip that maps server-side ValidationProblemDetails back into the EditContext.
Page 1 of 28 Next ›