public async Task Handle(CancelHotelRequest message, IMessageHandlerContext context) { Log.Info($"Hotel for Trip Id {message.TripId} is canceled"); var result = new BookingHotelResponse { TripId = message.TripId, IsBooked = false }; await context.Publish(result); }
private async Task CancelHotel(IMessageHandlerContext context) { Log.Info($"Sending cancel hotel request for Trip Id {Data.TripId}"); Data.OrderStatuses[OrderType.Hotel] = OrderStatus.CancelRequestIsSent; var command = new CancelHotelRequest { TripId = Data.TripId }; await context.Send(command); }