public ActionResult Delete(int id, Priority priority) { try { _db.Entry(priority).State = System.Data.EntityState.Deleted; _db.SaveChanges(); return RedirectToAction("Index"); } catch { // TODO Add error display logic here eventually. return View(); } }
public ActionResult Create(Priority newPriority) { try { _db.Priorities.Add(newPriority); _db.SaveChanges(); return RedirectToAction("Index"); } catch { // TODO Add error display logic here eventually. return View(); } }