Why MediatR May Be Adding Complexity to Your .NET App Without Real Benefit
MediatR has become a default dependency in many .NET projects, often added in the first week without a clear architectural reason. Critics argue that for straightforward CRUD applications, the library introduces unnecessary layers — turning a single service call into multiple classes and registrations — without delivering meaningful decoupling. While its pipeline feature for cross-cutting concerns like logging and validation is genuinely useful, .NET's built-in middleware and filters already cover much of that ground. The library earns its place in codebases with true CQRS separation, large teams needing consistent structure, or complex pipeline requirements. Developers are advised to evaluate whether a plain service class would suffice before reaching for MediatR by default.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in