private List <Schedule> GetAllSchedules() { var repo = new EplRepo(); var schedules = repo.GetAllSchedule(); return(schedules); }
public ActionResult TvShow() { var repo = new EplRepo(); var tvshows = repo.GetAllTvShows(); var viewmodels = new TvShowService().MapToViewModel(tvshows); return(View(viewmodels)); }
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")); }
public void Setup() { _repo = new EplRepo(); _repo.DeleteSchedule(1); }