public ActionResult Delete(int id, PersonModel iList) { try { PersonDBHandler PersonHandler = new PersonDBHandler(); if (PersonHandler.DeletePerson(id)) { ModelState.Clear(); } return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, IFormCollection collection) { try { PersonDBHandler PersonHandler = new PersonDBHandler(_configuration); if (PersonHandler.DeletePerson(id)) { ModelState.Clear(); } return(RedirectToAction("Index")); } catch { return(View()); } }