MediatR Alternative

I Built My Own MediatR! Here How You Can Too

So, MediatR’s changing things up, right? If you’re looking for a free way to handle messaging in your .NET apps, I’ve got something cool for you. In my latest video, I walk you through building your own alternative to MediatR. We’ll dive into the Mediator pattern, CQRS (Command Query Responsibility Segregation) and how to implement CQRS using the Mediator pattern. You’ll see how to set up the basics for sending commands and queries, and how to get the right code to handle them. ...

June 2, 2025 · 1 min · Mohamad Dbouk
Source Generator in .NET

Implement Builders easily with Source Generator in .NET

I created a YouTube video on Source Generator in which I showcased one possible implementation. However, I feel that I didn’t fully highlight its capabilities. In this blog post, I aim to demonstrate how to use the Source Generator to automatically create builders for a given class. Check the YouTube video and the source code here For our Builder Generator implementation, let’s start from scratch. Create a new class library project, name it SourceGenerator, add the necessary NuGet package references, and add a new class called AutoBuilderGenerator as shown in the code snippet below ...

February 28, 2024 · 4 min · Mohamad Dbouk