Why does this ActionFilterAttribute not import data to the ViewModel?
- by Tomas Lycken
I have the following attribute
public class ImportStatusAttribute : ActionFilterAttribute
{
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
var model = (IHasStatus)filterContext.Controller.ViewData.Model;
model.Status = (StatusMessageViewModel)filterContext.Controller.TempData["status"];
…