MediatorPattern with MediatR The Mediator pattern is like a messaging system within your application.
It lets different parts of your code send messages to a central mediator and subscribe to those messages.
Instead of having classes talk to each other directly, they communicate through the mediator. This means classes can interact without being tightly connected, which makes your code easier to manage and understand.
Simplifies message handling: Centralizes communication. Reduces dependencies: Keeps classes loosely coupled. Improves code clarity and reusability: Makes your code cleaner and more modular.