Ejemplo n.º 1
0
 public ActionResult Delete(int id, Auther auther)
 {
     try
     {
         // TODO: Add delete logic here
         autherReposetory.Delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 2
0
        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());
            }
        }