public ActionResult Delete(int id, IFormCollection collection)
 {
     try
     {
         crsRepository.Delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
 public ActionResult Delete(int courseID)
 {
     courseRepo.Delete(courseID);
     return(Ok());
 }