/cqrs-validation-mediatr-fluentvalidation

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

Primary LanguageC#MIT LicenseMIT

CQRS Validation Pipeline with MediatR and 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