public ActionResult Delete(Cars auto) { try { if (transportDAO.DeleteRecord(auto)) { return(RedirectToAction("Index")); } else { return(View()); } return(RedirectToAction("Index")); } catch { return(View()); } }