endpoint filter
Code that wraps selected minimal API handlers to run checks, such as validation or timing, before or after the handler.
In more detail
A filter receives the handler's arguments and can reject the request or change the result. Keep filters focused; behaviour for the whole application still belongs in middleware.
Related terms
- minimal API — An ASP.NET Core style that declares each route and its handler together, as in app.MapGet("/api/ping", () => Results.Ok("catalog")).
- filter — Code that runs before or after a controller action to handle a concern such as validation, logging or authorization for selected actions.
- cross-cutting concern — A need that applies across many services or endpoints, such as authentication, rate limiting, logging or TLS, rather than to one feature.
Taught in
- Building Routes with Minimal APIs — Modern .NET Core, C# & Enterprise Microservices