Run a method before each Action in MVC3

后端 未结 3 1544
别那么骄傲
别那么骄傲 2021-02-05 23:33

How can we run a method before running each Action in MVC3?

I know we can use the following method for OnActionExecuting :

public cla         


        
3条回答
  •  醉话见心
    2021-02-06 00:25

    I would also suggest looking into AOP, Postsharp or Castle Windsor can easily handle such as task.

提交回复
热议问题