A short tutorial showing how to integrate the MediatR library with .NET minimal API endpoints. It demonstrates registering MediatR with the DI container, defining a request and handler, and wiring them up so business logic stays out of the endpoint itself. Includes a simple working example that adds two numbers via a mediator-dispatched handler.
1 Impression