public async Task CompensateAsync(HotelReservationCreated message, ISagaContext context) { await _busPublisher.SendAsync(new CancelHotelReservation(message.ReservationId), CorrelationContext.FromId(context.CorrelationId)); }
public async Task HandleAsync(OrderCanceled message, ISagaContext context) { await _busPublisher.SendAsync(new ReleaseProducts(message.Id, message.Products), CorrelationContext.FromId(context.SagaId /* CorrelationId*/)); }
public async Task HandleAsync(HotelReservationCreated message, ISagaContext context) { await _busPublisher.SendAsync(new CreateFlightReservation(message.UserId, message.StartDate, message.EndDate), CorrelationContext.FromId(context.CorrelationId)); }