2026-04-30 csharpdotnetdotnet-11 How to use System.Threading.Lock in .NET Use System.Threading.Lock for synchronous critical sections on .NET 9 and later. Understand compiler lowering, async restrictions and Monitor compatibility.
2026-04-30 csharpdotnetdotnet-11 How to write a source generator for INotifyPropertyChanged A complete guide to building your own incremental source generator for INotifyPropertyChanged in C# 14 and .NET 11: the IIncrementalGenerator pipeline, marker attributes, partial-class output, the SetProperty pattern, and how to stay AOT-friendly.
2026-04-29 dotnetdotnet-11filesystem How to detect when a file finishes being written to in .NET FileSystemWatcher fires Changed before the writer is done. Three reliable patterns for .NET 11 to know a file is fully written: open with FileShare.None, debounce with size stabilization, and the producer-side rename trick that avoids the problem entirely.
2026-04-29 blazorblazor-webassemblyaspnetcore-11 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.
2026-04-29 dotnetdotnet-11performance How to use SearchValues<T> correctly in .NET 11 SearchValues<T> beats IndexOfAny by 5x to 250x but only when you use it the way the runtime expects. The cache-as-static rule, the StringComparison gotcha, when not to bother, and the IndexOfAnyExcept inversion trick that nobody documents.
2026-04-27 csharpdotnetdotnet-11 How to use Native AOT with ASP.NET Core minimal APIs Configure a Minimal API for Native AOT with generated JSON metadata. Understand builder choices, deployment toolchains, warnings and feature limitations.
2026-04-27 ef-coreef-core-11dotnet-11 How to warm up EF Core's model before the first query EF Core builds its conceptual model lazily on the first DbContext access, which is why the first query in a fresh process is several hundred milliseconds slower than every query after it. This guide covers the three real fixes in EF Core 11: a startup IHostedService that touches Model and opens a connection, dotnet ef dbcontext optimize to ship a precompiled model, and the cache-key footguns that silently rebuild the model anyway.
2026-04-26 csharpdotnetdotnet-11 How to add a global exception filter in ASP.NET Core 11 A complete guide to global exception handling in ASP.NET Core 11: why IExceptionFilter is the wrong tool, how IExceptionHandler and UseExceptionHandler work together, ProblemDetails responses, multi-handler chains, and the .NET 10 diagnostics suppression breaking change.
2026-04-26 mcpai-agentsclaude-code How to Build a Custom MCP Server in C# on .NET 11 Build a working Model Context Protocol server in C# 14 / .NET 11 using the official ModelContextProtocol 1.2 SDK. Covers stdio transport, [McpServerTool] attributes, dependency injection, the stderr logging trap, and registration with Claude Code, Claude Desktop, and VS Code.
2026-04-26 ef-coreef-core-11dotnet-11 How to mock DbContext without breaking change tracking Mocking DbContext directly silently breaks ChangeTracker, which is why Microsoft discourages it. This guide shows the two patterns that actually work in EF Core 11: SQLite in-memory with a kept-open connection so the real ChangeTracker runs, and the repository pattern that lifts EF Core out of the test entirely.