ASP.NET Core & Web API (50 Qs)•Part 1: Request Pipeline, Dependency Injection & Web APIs (1 - 10)
What are Action Filters and Endpoint Filters in ASP.NET Core?
senior LevelMost AskedDependency InjectionPipesCI/CD & DevOps
In Simple Words:
- Action Filters: Intercept controller action invocation (
OnActionExecuting,OnActionExecuted), enabling cross-cutting concerns like validation and audit logging. - Endpoint Filters (.NET 7+): Middleware-like filters applied to specific Minimal API routes or route groups, wrapping the endpoint handler execution.