DEV Community

Mohamed Ashmawy
Mohamed Ashmawy

Posted on

🚀 Introducing AutoMediate: A Drop-In Mediator for .NET

If you’ve ever worked with the Mediator pattern in .NET, you’ve probably come across MediatR.
It’s a great library, but sometimes it adds more configuration and boilerplate than you’d like.

That’s why I built AutoMediate 🎉 — a lightweight, convention-based mediator library designed as a drop-in replacement for MediatR — but with less friction.

✨ Why AutoMediate?

🔌 Zero configuration — handlers are automatically wired up.

🪶 Lightweight & clean — keep your code simple.

⚡ Fast — minimal overhead.

🤝 Familiar pattern — same mediator style you know.

đź’Ż Free & Open Source (unlike MediatR).

📦 Get Started

AutoMediate is available today:

GitHub: https://github.com/mashmawy/AutoMediate

NuGet: https://www.nuget.org/packages/AutoMediate

Example usage public record Ping(string Message) : IRequest<string>; public class PingHandler : IRequestHandler<Ping, string> { public Task<string> Handle(Ping request, CancellationToken ct) => Task.FromResult($"Pong: {request.Message}"); } 
Enter fullscreen mode Exit fullscreen mode

No configuration needed — AutoMediate wires it up automatically.

🙌 Feedback Welcome

I’d love for you to try it out, share your thoughts, and maybe even contribute.

dotnet #csharp #opensource #nuget #architecture

Top comments (0)