コード例 #1
0
        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"));
        }
コード例 #3
0
        public static void DeleteTrainer(Trainer t)
        {
            TrainerRepository trainerRepository = new TrainerRepository();

            trainerRepository.Delete(t);
        }