Skip to content

Instantly share code, notes, and snippets.

@jglozano
Created October 7, 2010 03:46
Show Gist options
  • Save jglozano/614518 to your computer and use it in GitHub Desktop.
Save jglozano/614518 to your computer and use it in GitHub Desktop.
public class PocoInvoker : ControllerActionInvoker {
protected override ActionResult CreateActionResult (ControllerContext controllerContext, ActionDescriptor actionDescriptor, object actionReturnValue) {
if (!(actionReturnValue is ActionResult)) {
controllerContext.Controller.ViewData.Model = actionReturnValue;
return new PocoResult (actionReturnValue);
}
return base.CreateActionResult (controllerContext, actionDescriptor, actionReturnValue);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment