ASP.NET Core Action Filters, Exception Filters and Dependency Injection
There are times when we want to be able to consistently add a behaviour across our ASP.NET Core
app that doesn’t quite belong in application logic – a classic example is timing how long a request takes. This is where Filters come in (or Middleware, but that’s for another post).