Exemplo n.º 1
0
        public async void BookRide(int rideId, string username)
        {
            Passenger passenger = await PassengerRepository.GetPassengerByUsername(username);

            Ride ride = await RideRepository.GetRideById(rideId);

            passenger.RidesAsPassenger.Add(ride);
            await RideRepository.AddPassengerToRide(passenger, rideId);
        }