
Customizing ASP.NET Core 5.0
By :

ActionFilters
give us an easy way to keep the actions clean. If we find repeating tasks inside our actions that are not really relevant to the actual responsibility of the action, we can move those tasks out to an ActionFilter
, or maybe ModelBinder
or a MiddleWare
, depending on how globally it needs to work. The more relevant it is to an action, the more appropriate it is to use an ActionFilter
.
There are other kinds of filters, which all work in a similar fashion. To learn more about the different kinds of filters, reading the documentation proposed is definitely recommended.
In the next chapter, we will move on to the actual view logic and extend the Razor views with custom TagHelpers
.