2

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.

Saeid Babaei
  • 481
  • 2
  • 16
Mani
  • 43
  • 6

1 Answers1

3

See flow below:

enter image description here

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://learn.microsoft.com/aspnet/core/mvc/controllers/filters?view=aspnetcore-3.1

VillageTech
  • 1,968
  • 8
  • 18