How to use route handler filters in minimal APIs in ASP.NET Core 7
Take advantage of minimal API filters in ASP.NET Core 7 to modify request and response objects or short-circuit the request processing pipeline.
Valuetask Invokeasync Demofilter Iloggerfactory Valuetask Invokeasync Routehandlerinvocationcontext Services Addsingleton Visual Studio Microsoft Aspnetcore Http
Source: infoworld.com