public ActionResult Delete(int id, FormCollection collection) { try { Court ToDelete = new Court(); ToDelete = SqlCourt.GetCourt(id); SqlCourt.DeleteCourt(ToDelete); // TODO: Add delete logic here return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Court/Delete/5 public ActionResult Delete(int id) { Court court = SqlCourt.GetCourt(id); return(View(court)); }