Difference between OnActionExecuted and OnResultExecuting

后端 未结 3 510
小鲜肉
小鲜肉 2021-01-01 08:29

What is the difference between OnActionExecuted and OnResultExecuting? Do they both get fired right after each other once the action has been processed or does something hap

3条回答
  •  一整个雨季
    2021-01-01 09:00

    They get called after one another.

    There can be no initialisation, since the ActionResult you are executing may not be rendering a View - ActionResults are free to do whatever they choose: return JSON, return a File, issue a redirect, etc.

提交回复
热议问题