Example #1
0
        private List <Schedule> GetAllSchedules()
        {
            var repo      = new EplRepo();
            var schedules = repo.GetAllSchedule();

            return(schedules);
        }
Example #2
0
        public ActionResult TvShow()
        {
            var repo       = new EplRepo();
            var tvshows    = repo.GetAllTvShows();
            var viewmodels = new TvShowService().MapToViewModel(tvshows);

            return(View(viewmodels));
        }
Example #3
0
        public async Task <ActionResult> AddSchedule(ScheduleViewModel model)
        {
            if (ModelState.IsValid)
            {
                var schedule = new Schedule(model);
                var repo     = new EplRepo();
                repo.UpSertSchedule(schedule);
                return(RedirectToAction("Index", "Home"));
            }

            return(RedirectToAction("About", "Home"));
        }
Example #4
0
 public void Setup()
 {
     _repo = new EplRepo();
     _repo.DeleteSchedule(1);
 }