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 friend, I just released a new video showing a better way to use GitHub Copilot in real .NET projects. Watch it here 👇 If you ever felt like Copilot starts strong but then your code slowly turns into chaos, you’re not alone. It happens to most developers when they start using AI without giving it the right guidance. In the video, I show you one simple file you can add to your project that keeps your code clean, structured, and consistent. No guessing. No random patterns. Just a clear...

video preview

Hey friend, I just published a new video that walks you through how to upgrade to .NET 10. Watch it here 👇 If you're already trying the update, you may have seen this: the app builds no errors but… Blazor doesn't load That happened in my project too. And the fix is small, but easy to miss. In the video, I show: how to update the target frameworks how to update NuGet packages what changed for Blazor and how to fix the missing static assets issue No hype. Just a clear step-by-step walkthrough....

video preview

Hey friend, I just released a new video that shows how to add AI to a .NET app. Watch it here 👇 In the video, I take a simple .NET project and make it smart with AI. The app can generate item backstories with one click. Like magic. No big setup. No overthinking. Just .NET, Copilot, and the OpenAI API working together. If you’ve ever wondered: How do I call the OpenAI API from a .NET app? Can Copilot help with real features? How do I make my app do more than CRUD? This will help. Give it a...