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