Swagger UI used to ship by default with ASP.NET Core API projects, but recent .NET versions replaced it with a bare OpenAPI document. This post compares Swagger and Scalar as documentation UIs, walks through setting up each one in .NET 10, and covers when to pick one over the other. ...
Traditional config classes let properties be mutated anywhere and accept invalid values with no warning. This article shows how to use C# 14's new extension-block syntax with records to build "smart records" - immutable, self-validating configuration models for cleaner, safer ASP.NET Core apps. ...
AI hype is everywhere, but where do you start with .NET? In this beginner-friendly post, we build a simple RAG pipeline in an ASP.NET Core Web API using keyword matching instead of embeddings, covering retrieve, augment, and generate end to end, with vector embeddings saved for a later post. ...
The Model Context Protocol (MCP) gives AI assistants a standardized way to interact with software. Learn how to construct your first MCP server in ASP.NET Core, expose C# tools using standard attributes, and test your setup end-to-end with the official MCP Inspector. ...
This step-by-step breakdown shows what happens when C# hits an await: the compiler generates an IAsyncStateMachine struct with a MoveNext() method splitting code at each await, using a GetDataCountAsync example with two awaited HttpClient calls to show how OnCompleted frees the calling thread. ...
This walkthrough builds a .NET 10 ASP.NET Core Web API (TwoFaNET10) implementing two-factor authentication and WebAuthn/FIDO2 passkey login, using Microsoft.AspNetCore.Identity.EntityFrameworkCore with Npgsql PostgreSQL, JWT bearer tokens, and a custom ApplicationUser extending IdentityUser. ...
Add file logging to an ASP.NET Core API with Serilog: configure the File sink, enable daily rolling logs, move settings to appsettings.json, control log levels, and enrich entries with machine name and user context. Includes a startup-exception logging example and production tips. ...
Five EF Core bulk-fetch methods from Z.EntityFramework.Extensions that bypass the 2,100-parameter limit of .Contains: WhereBulkContains, WhereBulkNotContains, BulkRead, WhereBulkContainsFilterList, and WhereBulkNotContainsFilterList, benchmarked on a 1M-row PostgreSQL dataset. ...
Builds an ASP.NET Core Minimal API benchmarked with BenchmarkDotNet against a PostgreSQL Orders table, comparing a naive EF Core query using Include and Take(50000) against a raw Dapper query with pagination, indexing, and connection pooling to sustain 1M requests per minute. ...