protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return(new AThing() { SomeRandomValue = _bar.IPityTheFoo() }); }
public ActionResult Index() { ViewBag.Message = "Welcome to ASP.NET MVC! " + _bar.IPityTheFoo(); return(View()); }
public void OnActionExecuted(ActionExecutedContext filterContext) { string message = String.Format("<!-- Your mom is so fat, she makes viewstate look lightweight. {0} -->", _bar.IPityTheFoo()); filterContext.HttpContext.Response.Write(message); }