public ActionResult Edit(TaskModel collection) { try { // TODO: Add update logic here tk.Edit(collection); return(RedirectToAction("Details", new { id = collection.TaskID })); } catch { return(View()); } }