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, I just published a new video where I put GPT-5’s Agent Mode to the test. 🚀 Instead of asking it for something simple, I went all in: A .NET 9 console app calculator A Web API with endpoints and docs A Blazor Server app with extra counter buttons And even a Blazor app that calls a public weather API 🎥 Watch it now: In the video, I didn’t just type “make me an app” and hope for the best. I gave GPT-5 very specific prompts, like: “Please create a .NET 9 console application that works...

Hey Reader, I’m back! 🎉 I’ve been on parental leave for the past 2 months, enjoying time with the family. Now I’m diving back into videos and here’s the first one! 🎥 Watch it now: Here’s the TL;DR if you can’t click right now: AI can already write code, fix bugs, and explain complex concepts. So… are we doomed? No. AI isn’t replacing developers anytime soon. But: Developers who use AI will replace those who don’t. The best devs are using GPT to: Skip repetitive work Prototype faster Learn...

video preview

Hey Reader, After 15 years of building web apps, I just recently discovered Vertical Slice Architecture. I know. I’m late to the party. But wow, this approach really changed how I think about structuring Blazor projects. So I decided to show you a simple, real-world example of how to use Vertical Slice Architecture in a Blazor Server app. 🎥 Watch the full tutorial now: In this new tutorial, you'll learn: ✅ How to structure your app with feature folders ✅ How to avoid overcomplicating things...