JSON Contracts, AI Workflows, and Query Plans
A varied .NET roundup covering Swagger polymorphism, ASP.NET Core claims, RAG and MCP choices, PostgreSQL plans, and C# fundamentals.
Jasen's top three picks
- 1 Is Any() Really Better Than Count() > 0?
Medium
A sensible performance question with the right answer: measure the source, provider, and intent before declaring a LINQ winner.
- 2 System.Text.Json Polymorphism with Swagger in .NET 7
Medium
Serialization support alone is not an API contract; OpenAPI consumers need the discriminator story too.
- 3 Operators & Control Flow in C#: What .NET Interviews Actually Ask
Medium
Useful interview preparation for revisiting the C# mechanics developers use every day.
Editor's note
I pulled together a deliberately broad mix today, from language fundamentals to AI workflow design and database diagnostics. The System.Text.Json and Swagger piece matters because API contracts need to remain coherent beyond serialization. Milan Jovanović’s PostgreSQL index example is a useful reminder to verify query plans rather than assuming another index helps.
Today's articles
Is Any() Really Better Than Count() > 0?
Medium
Like everything else in life, it depends.
Topics: C# Performance
Read articleSystem.Text.Json Polymorphism with Swagger in .NET 7
Medium
Polymorphic JSON is not finished when System.Text.Json can serialize a derived type. The same discriminator contract must survive OpenAPI…
Topics: C# System.Text.Json Web API
Read articleOperators & Control Flow in C#: What .NET Interviews Actually Ask
Medium
Value types vs reference types usually opens a .NET interview — operators and control flow is often where it continues. Most of it looks…
Topics: C#
Read articleCommandFlow — version 2.0
Medium
A few weeks ago, I presented CommandFlow, the alternative to CQRS and MediatR. The goal of the framework was to provide a simple but…
Read articleMicrosoft Agent Framework: Human In The Loop
YapCast – Jesse Liberty
tl;dr If you’re building automated workflows that sometimes must pause for human judgment (approvals, moderation, triage), Microsoft Agent Framework provides first‑class HITL primitives: typed Request...
Read articleAuthentication in ASP.NET Core
Medium
A deep-dive walkthrough of authentication in ASP.NET Core — covering the ClaimsPrincipal/ClaimsIdentity model everything else builds on…
Topics: ASP.NET Core Authentication
Read articleHow can I remove the Close button from my window caption?
Microsoft Dev Blogs
Occasionally, somebody wants to create a window without a Close button. The only way to get rid of the Close button is not to have a System menu at all: Remove the WS_SYSMENU style from the window. B...
Read articleBuilding a RAG Application with .NET 10 and OpenAI
Medium
A practical, step-by-step introduction to embeddings, vector similarity, retrieval, and grounded LLM responses using C# and .NET 10.
Read articleAdding an Index Made This Query Slower
Milan's .NET Weekly
A query already had a usable index. Adding another index made Postgres choose a plan that discarded almost half a million rows to return ten.
Topics: Performance PostgreSQL
Read articleWhat if an agent could refactor your agent?
YouTube
https://aka.ms/foundry-portal https://aka.ms/InsideMicrosoftFoundryPlaylist Your cupcake agent works. But is it still using the current Microsoft Foundry pattern? Would you notice if the SDK changed? ...
Topics: Azure
Read articleValue Types vs Reference Types in C#: What .NET Interviews Actually Ask
Medium
If there’s one C# fundamentals topic that shows up in almost every .NET interview, it’s this one. It sounds simple on the surface — “value…
Topics: C#
Read article8 Modern C# Features That Make Everyday Code Shorter and Safer
Medium
C# has changed a lot since the C# 7 days, and most of the additions are not exotic language-designer toys.
Topics: C#
Read articleWhen (Not) to Use MCP in .NET: A Practical Guide
Medium
I built a working MCP server in C#, hit every production gotcha the tutorials skip, and then had to ask myself if any of it was necessary
Topics: C#
Read articleI Built a Finite-State Transducer in C# Because a Dictionary Wasn’t Enough
Medium
There are not many situations in normal C# development where you start with
Topics: C# Design Patterns
Read articleWhy didn't ReadDirectoryChangesW provide a way to correlate the two sides of a rename operation?
Microsoft Dev Blogs
Brian Dellisanti asked why ReadDirectoryChangesW didn't provide a way to correlate the two sides of a rename operation. I wasn't there, but I can guess. My guess is that the implementation alwa
Read article