Exemple #1
0
 public AcceptedPassengerBookingProposalCommandHandler(
     IPassengerBookingProposalRepository passengerBookingProposalRepository,
     IDailyRouteRepository dailyRouteRepository)
 {
     _passengerBookingProposalRepository = passengerBookingProposalRepository;
     _dailyRouteRepository = dailyRouteRepository;
 }
Exemple #2
0
        public static async Task <PassengerBookingProposal> GetOrFailAsync(this IPassengerBookingProposalRepository passengerBookingProposalRepository, Guid id)
        {
            var passengerBookingProposal = await passengerBookingProposalRepository.GetAsync(id);

            if (passengerBookingProposal == null)
            {
                throw new ArgumentNullException($"Passenger Booking Proposal with {id} not exist");
            }

            return(passengerBookingProposal);
        }
 public PassengerBookingService(
     IPassengerBookingProposalRepository passengerBookingProposalRepository,
     IDailyRouteRepository dailyRouteRepository,
     IDriverRepository driverRepository, IUserRepository userRepository,
     IPassengerBookingRepository passengerBookingRepository)
 {
     _passengerBookingProposalRepository = passengerBookingProposalRepository;
     _dailyRouteRepository       = dailyRouteRepository;
     _driverRepository           = driverRepository;
     _userRepository             = userRepository;
     _passengerBookingRepository = passengerBookingRepository;
 }