public async Task Handle(UpdateAllotmentEvent message, IMessageHandlerContext context) { Data.AllotmentEventId = message.AllotmentEventId; Data.TransactionHash = message.TransactionHash; var ethereumTransactionType = GetTransactionType(message.Operation); await _transactionService.StartAsync(message.TransactionHash, message.UserId, EthereumTransactionEntityType.AllotmentEvent, message.AllotmentEventId, ethereumTransactionType); await context.SendLocal(new WaitForTransaction { TransactionHash = message.TransactionHash }); }
public async Task <IActionResult> Delete(long eventId, string transactionHash) { var command = new UpdateAllotmentEvent( eventId, transactionHash, AllotmentEventOperation.Delete, User.GetUserId()); await _messageSession.SendLocal(command); return(NoContent()); }
public async Task <IActionResult> UpdateAsync(long id, [FromBody] UpdateAllotmentEventRequest request) { var command = new UpdateAllotmentEvent( id, request.TransactionHash, AllotmentEventOperation.Delete, User.GetUserId()); await _messageSession.SendLocal(command); return(NoContent()); }