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