public async Task <Showing> GetShowingById(int showingId, bool includeSeatReservations)
        {
            Showing        retrievedShowing;
            ShowingService sService = new ShowingService();

            try
            {
                retrievedShowing = await sService.GetShowing(showingId, includeSeatReservations);
            }
            catch (Exception)
            {
                retrievedShowing = null;
            }
            return(retrievedShowing);
        }
        public async Task <bool> UpdateShowingBookings(int showingId, string changedSeatRes, int userPhoneNumber)
        {
            bool           wasUpdatedOk = false;
            ShowingService sService     = new ShowingService();

            List <SeatBooking> newReservations = GetSeatBookings(showingId, changedSeatRes, userPhoneNumber);

            try
            {
                wasUpdatedOk = await sService.UpdateSeatBookings(showingId, newReservations);
            }
            catch (Exception)
            {
                wasUpdatedOk = false;
            }
            return(wasUpdatedOk);
        }
Пример #3
0
 public ShowingServiceTest()
 {
     _uof     = new Mock <IUnitOfWork>();
     _mapper  = new Mock <IMapper>();
     _service = new ShowingService(_uof.Object, _mapper.Object);
 }
 public ShowingsController(ShowingService businessware)
 {
     _businessware = businessware;
 }
 public ShowingLogic()
 {
     _sAccess = new ShowingService();
 }