Chapter 13. The MVC filter pipeline

This chapter covers

  • The MVC filter pipeline and how it differs from middleware
  • Creating custom filters to refactor complex action methods
  • Using authorization filters to protect your action methods
  • Short-circuiting the filter pipeline to bypass action execution
  • Injecting dependencies into filters

In part 1, I covered the MVC framework of ASP.NET Core in some detail. You learned about MvcMiddleware and how routing is used to select an action method to execute. You also saw model binding, validation, and how to generate a response by returning an IActionResult from your actions. In this chapter, I’m going to head deeper into MvcMiddleware and look at the MVC filter pipeline, sometimes called the MVC action ...

Get ASP.NET Core in Action 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.