public async Task Handle(CreateInvoiceProposalResponse message, IMessageHandlerContext context) { var invoice = Data.Invoices.Single(s => s.CustomerId == message.CustomerId); invoice.InvoiceId = message.InvoiceId; invoice.Status = InvoiceStatus.Done; await TrySendNextBatch(context); }
private async Task CompleteSaga(IMessageHandlerContext context) { var response = new CreateInvoiceProposalResponse { CustomerId = Data.CustomerId, InvoiceId = Data.InvoiceId, BillingRunId = Data.BillingRunId }; await context.SendLocal(response); MarkAsComplete(); }