Shiny Mediator now can map up your request handlers to ASP.NET Core endpoints using the minimal API. This
saves you the effort of implementing the following boilerplate over and over and over again
The only thing that changes in this setup is the http method type, request type, and route. Now, all you have to do is
following;
Install Shiny.Mediator.AspNet to your ASP.NET Core project.
On your request handler (void or result based), add [MediatorHttpPost("OperationId", "MyRoute")] or [MediatorHttpPut("OperationId", "MyRoute")] (GET & DELETE attributes also available) attribute to the handler.
In your host startup, add the following after your build your app. Here is a full-ish sample
Here is a list of all the properties supported by the Http attributes
It is best to register most handlers and middleware as Scoped on ASP.NET Core apps
MediatorHttpGet & MediatorHttpDelete parameters can only be set on the route or querystring