cqrs-validation-mediatr-fluentvalidation icon indicating copy to clipboard operation
cqrs-validation-mediatr-fluentvalidation copied to clipboard

This repo contains the source code for the "CQRS Validation Pipeline with MediatR and FluentValidation" article on Code Maze

CQRS Validation Pipeline with MediatR and FluentValidation

https://code-maze.com/cqrs-mediatr-fluentvalidation

In this article, we are going to show you how to elegantly integrate a validation pipeline into our project using the MediatR and FluentValidation libraries.

This article is divided into the following sections:

  • What is CQRS?
  • Commands and Queries With MediatR
  • Validation with FluentValidation
  • Creating Decorators With MediatR PipelineBehavior
  • Creating a Validation PipelineBehavior
  • Handling Validation Exceptions
  • Setting up Dependency Injection
  • Validation Pipeline in Practice
  • Conclusion