public ActionResult Delete(int id) { var entry = _contactFormService.GetEntry(id); _contactFormService.DeleteEntry(entry); return(RedirectToAction("Index")); }
public ActionResult DeleteContactFormEntry(int id) { var entry = _contactFormService.GetEntry(id); if (entry == null) { ModelState.AddModelError("ContactFormEntry", T("Could not find the ContactFormEntry to delete.").ToString()); return(RedirectToAction("List")); } _contactFormService.DeleteEntry(entry); return(RedirectToAction("List")); }