public ActionResult NewUpdate(TaskUpdate taskUpdate) { // Validate model state if (!ModelState.IsValid) { return(View("NewUpdate", taskUpdate)); } taskService.AddTaskUpdate(taskUpdate); // Update Task Task task = taskService.GetTask(taskUpdate.TaskId); taskService.UpdateTask(task); // Redirect to the Detail view return(RedirectToAction("Detail", new { Id = taskUpdate.TaskId })); }