public ActionResult DeleteConfirmed(int id) { Trainer trainer = repos.GetTrainer(id); repos.Delete(trainer); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Trainer trainer = trainerRepository.GetById(id); trainerRepository.Delete(trainer); return(RedirectToAction("TrainerInfo")); }
public static void DeleteTrainer(Trainer t) { TrainerRepository trainerRepository = new TrainerRepository(); trainerRepository.Delete(t); }