public ActionResult Edit(TaskInputModel model)
 {
     CheckModelState(() => OnInvalidTaskForm("Edit", model));
     var task = mediator.Send(model.ToUpdateTaskCommand());
     this.Flash("success", string.Format("Updated task: {0}", task.Title));
     return RedirectToAction("Index");
 }