public ActionResult Success(int id) { var t = _repositoryTask.Get(id); t.StateTask = 2; _repositoryTask.Update(t); return(RedirectToAction("ViewTasks")); }