public IActionResult GetById(long id) { var seat = new SeatRepo(_context).GetSeat(id); if (seat == null) { return(NotFound()); } return(Ok(new ObjectResult(seat))); }
public IActionResult GetAll() { var seats = new SeatRepo(_context).GetSeats(); if (seats == null) { return(NotFound()); } return(Ok(new ObjectResult(seats))); }
public ActionResult SeatSelection(long?ScheduleID = null) { List <SeatGroup> model = null; if (ScheduleID.HasValue) { var schedule = new Schedule(); schedule.GetSingleSchedule(ScheduleID.Value); ViewBag.Schedule = schedule; model = SeatRepo.GetBySession(ScheduleID.Value).OrderByDescending(s => s.RowIndex).ToList(); } return(PartialView(model)); }
public void Setup() { seatRepo = new SeatRepo(seatTestContext); }