dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.66k stars 25.28k forks source link

The description about when filters run is not accurate. #26570

Open GingerMoon opened 2 years ago

GingerMoon commented 2 years ago

[Enter feedback here]

"Filters run within the ASP.NET Core action invocation pipeline, sometimes referred to as the filter pipeline. " This description seems to be conflict with the diagram (copied from the official site):

Filters seems to run inside the Endpoint middleware.

mvc-endpoint


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Rick-Anderson commented 2 years ago

@captainsafia please review

captainsafia commented 1 year ago

I think the distinction here is a matter of semantics. The filters do run within the MVC action invocation pipeline and the invocations can be triggered from the endpoint middleware. The part that might be confusing is referring to it as the filter pipeline, since that doesn't make it clear that it's happening as part of the action invocation.