public ActionResult Delete(int id, IFormCollection collection) { try { crsRepository.Delete(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public ActionResult Delete(int courseID) { courseRepo.Delete(courseID); return(Ok()); }