public async Task <Booking> CreateAsync(string startTime, string endTime, long customerId) { var customer = await _customerServiceApiClient.GetCustomerByIdAsync(customerId, _correlationContext.CorrelationContext.CorrelationId); var booking = new Booking(DateTime.UtcNow, DateTime.UtcNow.AddDays(1), customerId, customer.FirstName); await _bookingRepository.CreateAsync(booking); await _bookingRepository.SaveChangesAsync(); var @event = booking.Adapt <CreatedBookingEvent>(); _eventBus.Publish(@event); return(booking); }