public ActionResult Edit(DomainClasses.Task model) { try { var taskRepo = new TaskRepository(); taskRepo.EditTask(model); return(RedirectToAction("Details", new { id = model.Id })); } catch { return(View(model)); } }
public ActionResult Create(DomainClasses.Task model) { try { int backlogId = Int32.Parse(Session["BacklogId"].ToString()), userId = Int32.Parse(Session["UserId"].ToString()); var repo = new TaskRepository(); repo.AddTask(model, backlogId, userId); return(RedirectToAction("Index", "Backlog")); } catch { return(View()); } }