public ActionResult EditTask(TaskViewModel task) { if (ModelState.IsValid) { _taskLogic.EditTask(_mapper.Map <TaskModel>(task)); return(RedirectToAction("ListTasks")); } return(RedirectToAction("Error", "Home")); }