Fixing Kiota integer properties generated as UntypedNode
How ASP.NET Core JSON number handling affects OpenAPI schemas and Kiota integer properties, and what changing to strict number handling means for existing clients.
Creating custom GitHub Copilot chat modes in VS Code
How I use task-specific chat modes for issue writing, planning, tests and backlog analysis, with Markdown templates to adapt to a project.
The Double-Edged Sword of Conveniently Named Exceptions
Choosing a C# exception because its name sounds right is a common anti-pattern. Learn why this leads to confusing logs, unnecessary costs, and better ways to handle errors.
My Epic Battle with FFmpeg: A C# Video Overlay Story
What started as a simple task—programmatically adding branded intros and outros to a video—quickly descended into a multi-day debugging marathon. This is the story of how a seemingly impossible FFmpeg problem was solved with C#.
Architecting C# Domain Models for Human and AI Collaboration
I went down a rabbit hole of extreme encapsulation in C# only to find a more pragmatic path. Discover the journey from a complex domain model to a simpler one that provides powerful guardrails for AI development tools like GitHub Copilot.
Keep Your Domain Clean: Deserializing with Private Setters in C#
Ever created a perfectly encapsulated C# domain object with private setters, only to find System.Text.Json can't deserialize data back into it? You don't have to expose your setters! Let's explore a clean solution.
The Deceptive Simplicity of Polymorphism in .NET APIs
You add one more state to your polymorphic API response, and suddenly everything breaks. This is the story of a subtle bug, a frustrating debugging session, and the one line of code that fixed it all.
Slaying the EF Core Cartesian Explosion with AsSplitQuery()
You built a rich domain model with aggregates and child collections, but now your queries are painfully slow. Learn how a one-line change in Entity Framework Core, .AsSplitQuery(), can fix the dreaded "Cartesian Explosion" and make your app fly.
EF Core's Hidden Identity Crisis: The Owned Entity Cloning Problem
Your integration tests all pass, but your live app throws a cryptic EF Core error about modifying a key that doesn't even exist. Let's dive into the fascinating reason why and how to fix it.
Creating an asynchronous AuthorizeAttribute in MVC
A couple days ago I needed to call a remote web api call in my AuthorizeAttribute sometimes but as mentioned in this (Is it possible to use async/await in MVC 4 AuthorizeAttribute?) StackOverflow question (and other forums) it isn't supported but is in the newer .net core. Unfortunately the project I needed this on was traditional MVC so I was left still finding a way .
Generating code documentation using Ghost Doc Enterprise
I've recently started catching up with all the blogs that I've wanted to write and have had flagged to write for a long time. This one I have had flagged since 26 January 2016.