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.

2m read timeFrom nodogmablog.bryanhogan.net
Post cover image
1 Impression