← all tags

Tagged C#

11 postsRSS ↗
Jan 07, 2026·3 min read

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.

KiotaOpenAPIASP.NET Core+2 more
Oct 21, 2025·10 min read

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.

AIVS CodeProductivity+3 more
Sep 03, 2025·8 min read

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.

C#.NETClean Code+2 more
Aug 14, 2025·6 min read

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#.

C#FFmpegVideo Processing+1 more
Aug 05, 2025·10 min read

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.

C#Domain-Driven DesignArchitecture+3 more
Jul 22, 2025·6 min read

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.

C#.NETSystem.Text.Json+2 more
Jul 17, 2025·5 min read

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.

.NETC#JSON+2 more
Jul 10, 2025·5 min read

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.

C#.NETEntity Framework+1 more
Jul 07, 2025·5 min read

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.

Entity Framework CoreC#.NET+1 more
Jan 26, 2018·4 min read

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 .

asyncC#MVC+1 more
Apr 30, 2017·12 min read

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.

Visual StudioC#Ghost Doc+1 more