public ActionResult Delete(int?id) { if (id != null) { db.Delete(id); } return(RedirectToAction("Index")); }