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

video preview

Hey Reader, In my last videos, we built a solid CRUD API using Vertical Slice Architecture, Minimal APIs, and Carter - super clean and modern. But there’s still one problem... 👉 What happens when a user sends empty or invalid data? In this new YouTube tutorial, I’ll show you how to fix that with: And yep, the full source code is free to download. Just check the link in the video description. If you’ve been enjoying this Vertical Slice series, this is a must-watch. It’s a simple upgrade that...

video preview

Hey Reader, If you're building apps with Blazor, you've probably asked yourself this: 👉 Should I use SSR, Blazor Server, or WebAssembly? It’s a common question - and I get it a lot. So I made a brand-new YouTube video walking you through how to choose the best one for your app. 🎥 Watch it here: If you're building a Blazor app or planning to do so soon, this should help clear up a lot of confusion. Let me know what you think, and feel free to reply if you have any questions. Take care, Patrick...