Chapter 7: CQRS in Action
Having learned what the CQRS pattern, the Mediator pattern, and the MediatR NuGet package are, it's time to apply them in the ASP.NET Core 5 Web API that we are building. The patterns and package mentioned will bring value to our application by making it very scalable, testable, and readable.
In this chapter, we will cover the following topics while writing code in our application:
- Implementing CQRS
 - Adding the 
MediatRpackage - Creating 
MediatRpipeline behaviors - Using 
FluentValidation - Using 
AutoMapper - Writing queries
 - Writing commands
 - Writing 
IServiceCollection