5 min Tame Configuration in ASP.NET Core with IValidateOptions
Silent misconfiguration is sneaky and expensive.
I'm Michael. Twenty years of C# and I still find new ways to embarrass myself. I teach .NET and Windows development the way I learned it, out loud, on camera, mistakes included.
More about me →Also new
All →Start here
Everything I've made →New around here? The things I would hand you first, in the order I would hand them over.
Stop Using ToLower() for Comparisons! The Fast, Correct Way in C#
Lowercasing strings to compare them costs allocations and can break under different cultures (hello, Turkish I). Why .ToLower()/.ToUpper() are the wrong tools for comparisons and how StringComparison and StringComparer give you fast, correct behavior
Video csharp · 14:26Tame Configuration in ASP.NET Core with IValidateOptions
Silent misconfiguration is sneaky and expensive. Learn how to validate strongly typed settings in .NET using IValidateOptions, add cross property rules, inject services, support named options, and fail fast at startup with ValidateOnStart.
Article aspnetcore · 5 minRepository Pattern vs DbContext in Entity Framework Core
Tired of arguing about repositories in EF Core? This practical guide compares direct DbContext, thin repositories, and specification style queries with small, runnable C# examples. Learn when each option shines, what to avoid, and how to keep your code clean without hiding EF Core features.
Article data · 4 minC#: Class, Struct or Record - Which Should You Choose?
Class, struct or record. You choose one of these every time you model anything in C#, and most advice stops at "records are for data". Under eight minutes on what actually drives the decision.
Video csharp · 7:53The Traps of Nullable<T> in C#: a Practical Guide with Tiny Examples
Nullable<T> is not a mini reference type and pretending it is will bite you. This guide walks through how nullable value types work at runtime, how boxing really behaves, and what operator lifting does. You will see small, runnable C# snippets that expose common traps and safe patterns. Learn how to handle equality, pattern matching, and generics without surprises.
Article csharp · 5 minLearning paths
Pick a rabbit hole. Each one is everything I've made on that topic, in the order that actually makes sense to read it.
Dev disasters
All 11 →Not mine. Yours. Other people's worst days, filed by how bad it got.
The .NET Drip
Every Sunday. One .NET tip, and the links that were actually worth reading.
No fluff, no "10 tips to 10x your productivity." One thing worth knowing, plus whatever I hit that week that made me stop and read it twice. Unsubscribe whenever, no hard feelings.
Subscribe for free · read the archive