You Don’t Need MediatR? I Built My Own 🚀


Hey Reader,

You may have seen the recent blog post from Jimmy Bogard (creator of MediatR and AutoMapper) announcing that these libraries are going commercial.

And to be clear, I fully support that. Time is money, and supporting your family always comes first.

BUT…

In most of my projects, I don’t actually use everything MediatR offers. I usually just need a small part of it, the classic "send a request, get a response" pattern.

So I thought: why not build a simple version myself?

👉 That’s exactly what I did in my latest video:

video preview

I show you how to create your own lightweight MediatR-style handler system using just interfaces and a little bit of reflection.

You’ll learn how to:

  • Implement IRequest and IRequestHandler
  • Build your own ISender interface
  • Register everything automatically with reflection (so your Program.cs stays clean!)
  • Use it in a vertical slice-style project

Let me know what you think. Should I publish this as a NuGet package? 🤔

Take care,

Patrick

P.S. The Easter Sale at the .NET Web Academy is live! 🐣 Grab your favorite course or plan at a huge discount while it lasts! Check it out here.


Patrick God

Become a .NET & Blazor expert with weekly tutorials featuring best practices and the latest improvements, right in your inbox.

Read more from Patrick God
video preview

Hey Reader, .NET 10 is almost here, and it brings a big upgrade for validation in Minimal APIs. In this week’s tutorial, I’ll walk you through how validation works now in .NET 10 (using Entity Framework, Scalar, and Minimal APIs). Before, writing validation logic in each endpoint was a pain. You had to manually check for null values, invalid quantities, or missing fields. But in .NET 10, that’s all built-in and super clean. Watch the full tutorial now: 👇 Happy coding! Take care, Patrick

video preview

Hey Reader, If you’ve been coding for a while, you’ve probably asked yourself this too: “Am I getting better… or just older?” I’ve been writing software for fifteen years now, and that question still sneaks up on me. But looking back, I’ve realized something: real growth in tech isn’t about frameworks or chasing trends. It’s about staying curious, patient, and keeping your spark alive when everything feels heavy. So I made a new video about it, my 15 biggest lessons from 15 years of coding....

video preview

Hey Reader, If you’re a Blazor developer, you know that annoying flash when your app loads data during pre-rendering. It’s been around forever. Sure, you could disable pre-rendering, but then you'd hurt performance and SEO. Well… with .NET 10, we finally have a real fix: the new Persistent State Attribute. 🎉 🎥 Watch my full tutorial about it here: In this video, I walk you through: ✅ What causes the flashing issue ✅ Why disabling pre-rendering isn’t ideal ✅ How the new Persistent State...