public ActionResult New(TaskInputModel model) { CheckModelState(() => OnInvalidTaskForm("New", model)); Task task = mediator.Send(model.ToCreateTaskCommand()); this.Flash("success", string.Format("Created new task: {0}", task.Title)); return RedirectToAction("Index"); }