protected ActionResult Exec <T>(Command <T> cmd, Func <T, ActionResult> success, Func <ActionResult> failure) { return(Exec(ModelState, () => PresentationRegistry.NewExecutor(ModelState.IsValid).Execute(cmd), success, failure)); }
protected TReturn Exec <TReturn>(Query <TReturn> query) { return(PresentationRegistry.NewExecutor(ModelState.IsValid).Execute(query)); }
protected ActionResult Exec(Command cmd, Func <ActionResult> success, Func <ActionResult> failure) { return(Exec <object>(ModelState, () => { PresentationRegistry.NewExecutor(ModelState.IsValid).Execute(cmd); return null; }, nullValue => success(), failure)); }