public ActionResult Delete(int id, FormCollection form) { try { db.Delete(id); Log.Info(Helper.DELETED_PERSON_SUCCESS); return(RedirectToAction("Index")); } catch (InvalidOperationException e) { Log.Fatal(Helper.NOT_FOUND, e); return(View("NotFound")); } catch (Exception e) { Log.Fatal(Helper.FATAL_ERROR, e); return(View("Error")); } }
public ActionResult Delete(int id, FormCollection form) { db.Delete(id); return(RedirectToAction("Index")); }