DRAG DROP
You are developing an ASP.NET MVC application.
Before an action is executed, information about the action must be written to a log. After results are
returned, information about the results also must be written to the log.
You need to log the actions and results.
You have the following code:
Which code segments should you include in Target 1, Target 2 and Target 3 to implement the
LogActionFilter class? (To answer, drag the appropriate code segments to the correct targets. Each
code segment may be used once, more than once, or not at all. You may need to drag the split bar
between panes or scroll to view content.)
Answer: See the explanation
Explanation:
The target 3 should be:
OnResultExecuted(ResultExecutedContext)
Called by the ASP.NET MVC framework after the action result executes.
https://msdn.microsoft.com/en-us/library/system.web.mvc.actionfilterattribute(v=vs.118).aspx
Agreed!
Target 3 should be:
OnResultExecuted(ResultExecutedContext)
Agree
Nice reference: https://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/understanding-action-filters-cs
https://msdn.microsoft.com/en-us/library/system.web.mvc.actionfilterattribute(v=vs.118).aspx