public ActionResult Delete(int id, Author author) { try { authorRepository.Delete(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public ActionResult ConfirmDelete(int id) { try { bookRepository.Delete(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }