October 2017
Intermediate to advanced
1024 pages
27h 39m
English
© Adam Freeman 2017
Adam Freeman, Pro ASP.NET Core MVC 2, https://doi.org/10.1007/978-1-4842-3150-0_19
Adam Freeman1
(1)London, UK
Filters inject extra logic into MVC request processing. They provide a simple and elegant way to implement crosscutting concerns—a term that refers to functionality that is used all over an application and doesn’t fit neatly into any one place, where it would break the separation of concerns. Classic examples of crosscutting concerns are logging, authorization, and caching. In this chapter, I show you the different categories of filters that MVC supports, how to create and use custom filters, and how to control their execution. Table 19-1 puts filters in context.