public ActionResult Delete(int id, Auther auther) { try { // TODO: Add delete logic here autherReposetory.Delete(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public ActionResult ConfirmDelete(int id) { try { // TODO: Add delete logic here string fileName = bookRepository.Find(id).imgURL; DeleteFile(fileName); bookRepository.Delete(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }