Topic

.NET & C#

Runtime behaviour, async, memory and APIs, explained from the source and checked with code you can run.

AI Engineering14 min

An Agent Tool Is an API: Caller Authority, Receipts and Lost Replies

Treat agent tool calls like public API requests: take identity from the host, scope tools per request, store receipts with the effect and replay lost replies.

AI Engineering15 min

RAG in .NET: retrieve the policy the caller can actually use

Build the retrieval side of RAG in C#: eligibility before top-k, grants and revisions in the query, chunks that keep their exceptions, and atomic revision publishing.

Performance & Data11 min

The Observer Effect: What .NET Telemetry Costs Before Sampling

A sampled-out span can still build its payload, and a stalled exporter silently drops spans. Measure both with OpenTelemetry .NET and add the guards and counters that fix them.

Performance & Data14 min

Moving Large Datasets with EF Core: Bounded, Resumable Batches

Export millions of rows through an EF Core 10 service without skipping or duplicating any: a frozen selection, keyset pages, a bounded pipeline and a receipt that commits with the data.

Performance & Data12 min

Same Service, Different Numbers: A Measurement Contract for .NET

One FrozenDictionary measured 42% faster, 6.5 times slower, or 347 µs instead of 89 µs. Reproduce all three on .NET 10 and learn what every performance number must state.