Esempio n. 1
0
 public ActionResult ConfirmDelete(int id)
 {
     try
     {
         bookStoreRepoitory.Delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Delete(int id, Author author)
        {
            try
            {
                authorRepository.Delete(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }