public async Task AddCustomerToTripAsync(Guid tripId, Guid customerId) { var trip = await _tripRepository.GetTripAsync(tripId); if (trip.TripStatus == TripStatus.Cancelled) { throw new DomainException(DomainErrorCodes.AddingCustomerToCancelledTrip, null, "Cannot add customer to cancelled trip"); } var customer = await _customerRepository.GetCustomerAsync(customerId); CheckTripNullOrFail(trip); if (customer == null) { throw new DomainException(DomainErrorCodes.CustomerDoesNotExist, null, "Customer does not exist!"); } await _tripRepository.AddCustomerToTripAsync(trip, customer); }