C# .NET 8 — MediatR Pipelines

Gabriele Tronchin
8 min readMay 5, 2024

Introduction

MediatR, available as a NuGet package for .NET, embodies the mediator design pattern, a strategy aimed at decoupling communication between objects.

For a comprehensive understanding of this pattern, you can refer to the following resource:

A well-established implementation of this pattern for .NET is MediatR, whose official GitHub project can be found here:

Fundamentals of MediatR

In essence, MediatR operates across three primary modes:

  • Request: Involving a single receiver with a service response.
  • Notification: Engaging multiple receivers without a service response.
  • StreamRequest: Utilizing a single receiver for stream operations with a service response.

--

--

Gabriele Tronchin

I'm a software engineer, specializing in backend development and distributed systems.