Asp.Net MVC: Is there support for controller-level filter attributes?

I have a filter attribute that I would like to apply to every action on my controller. Is there a built-in mechanism to support this? Right now, I manually add a filter to each action, but this error is prone and tedious. If there is no support for controller-level filter attributes, is there a better way to execute the logic?

+3
source share
1 answer

Apply filter attribute to controller class.

+7
source

Source: https://habr.com/ru/post/1697963/


All Articles