简体   繁体   中英

ActionFilter and ResultFilter different and Examples

I can't understanding the difference between ActionFilter and ResultFilter. ResultFilter after execution OnActionExecuted method. Could you please explain the main different and example about the ActionFilter and ResultFilter.

Thanks $ Regards, Manikandan M.

See flow below:

在此处输入图片说明

ActionFilter can be used for additional manipulations on action arguments and results. ResultFilter is processed only if an action was executed with success, and can be used, for example, to modify results which have to be displayed.

Examples you can find here: https://docs.microsoft.com/aspnet/core/mvc/controllers/filters?view=aspnetcore-3.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM