Why I Stopped Using MediatR and Built CQRS From Scratch in .NET 10
MediatR is a great library. I'm not here to trash it.
But when it moved to a paid model for commercial use, a lot of teams — including mine — had to make a decision. And the more I looked at what MediatR actually does under the hood, the more I realised: this is not complicated enough to justify an external dependency.
So I built it myself. Here's what that looks like, why I made each decision, and whether it was worth it.
What MediatR actually does
Strip away the marketing and MediatR does two things:
Takes a request object and routes it to the right handler
Runs a configurable pipeline of behaviors before and after the handler
That's it. The "mediator pattern" is mostly a fancy name for a dispatcher with middleware.…