MediatR Alternative

I Built My Own MediatR – Here’s 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
Mapperly Logo

Mapperly: The Coolest Object Mapping Tool in Town

Hey there, developers! Today I want to talk about an astonishing .NET library called Mapperly, which has been gaining much attention in the developer community. Mapperly is a powerful source generator that simplifies the implementation of object-to-object mappings in .NET applications. Mapperly takes mapping to a whole new level by generating mapping code for you based on the mapping method signatures you define. If you’re tired of writing repetitive mapping code and seeking a seamless solution to simplify object mappings in your .NET projects, Mapperly is the answer you’ve been waiting for. Join me in this blog post to learn more! ...

July 13, 2023 · 5 min · Mohamad Dbouk