Exemple #1
0
        public IActionResult GetById(long id)
        {
            var seat = new SeatRepo(_context).GetSeat(id);

            if (seat == null)
            {
                return(NotFound());
            }

            return(Ok(new ObjectResult(seat)));
        }
Exemple #2
0
        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));
        }
Exemple #4
0
 public void Setup()
 {
     seatRepo = new SeatRepo(seatTestContext);
 }