MediatR is an implementation of a mediator pattern that you get by applying some Command Query Responsibility Segregation (or Separation) concepts. This NuGet package was created by Jimmy Bogard, who also created AutoMapper.
CQRS separates our code into two distinct parts: commands, and queries (the code that reads, and the code that writes persistently).
Here's a recap about CQRS pattern advantages:
- Separating reads and writes: We can propagate this concept to our database configuration to have a faster read-only (maybe denormalized) database for reads, and another one for writes. The issue will be to synchronize both, but there are several ways to do that.
- With Azure, it's very easy to incorporate a service bus with a message ...