// GET: Provider/Edit/5 public ActionResult Delete(int id) { try { // TODO: Add delete logic here p.DeleteById(id); p.Commit(); return(RedirectToAction("getProviders")); } catch { return(View()); } }