Example #1
0
            public async Task <Unit> Handle(Command request, CancellationToken cancellationToken)
            {
                Guard.Null(request, nameof(AddApisToBooking) + nameof(Command));
                var booking = await _bookingRepository.GetBooking(request.BookingReference);

                var apis = new Apis(request.FirstName, request.LastName, request.DocumentNumber);

                booking.AddApis(apis);

                await _bookingRepository.SaveBooking(booking);

                return(Unit.Value);
            }
Example #2
0
 public void AddApis(Apis apis)
 {
     Apis = apis;
 }
Example #3
0
 public Booking(string bookingReference, Apis apis)
 {
     BookingReference = bookingReference;
     Apis             = apis;
 }