Пример #1
0
 public ActionResult Delete(int id, Auther auther)
 {
     try
     {
         autherRepository.delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
 public ActionResult Delete(int id, Book book)
 {
     try
     {
         bookRepository.delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }