1.

Define the concept of Filters in MVC?

Answer»

There are situations where I want to implement some logic either prior to the execution of the action method or right after it. In that SCENARIO, the Action Filters are USED. Filters are used to determine the logic needed for executing before or after the action method gets executed. Action methods MAKE use of the action filters as an ATTRIBUTE

Different types of MVC action filters are:

  • Action filter (that implements the IActionFilter).
  • Exception filter (that implements the IExceptionFilter attribute).
  • Authorization filter (that implements the IAuthorizationFilter).
  • Result filter (that implements the IResultFilter).


Discussion

No Comment Found