Chapter 14: Creating a Custom ActionFilter

We will keep on customizing on the controller level in this chapter. We'll have a look into action filters and how to create your own ActionFilter class to keep your Actions small and readable.

This chapter will cover the following topics:

  • Introducing ActionFilter
  • Using ActionFilter

The topics of this chapter belong to the Model-View-Controller (MVC) layer of the ASP.NET Core architecture, depicted here:

Figure 14.1 – ASP.NET Core architecture

Figure 14.1 – ASP.NET Core architecture

Technical requirements

To follow the exercises in this chapter, you will need to create an ASP.NET Core MVC application. Open your console, shell, or Bash ...

Get Customizing ASP.NET Core 6.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.