public void CheckSeatInRange(string Seat, int ShowTimeId) { ShowTime showTime = showTimeRepository.FindById(ShowTimeId); int numCol = showTime.Room.NumCol; int numRow = showTime.Room.NumRow; Tuple <int, int> parsedSeat = ParseSeat(Seat); bool isInRange = parsedSeat.Item1 <= numRow && parsedSeat.Item2 <= numCol; if (!isInRange) { throw new Exception("Seat Invalid!"); } }
public ShowTime GetDetail(int id) { return(repository.FindById(id)); }