示例#1
0
        public async Task Handle(StartScoring message, IMessageHandlerContext context)
        {
            Data.ProjectId       = message.ProjectId;
            Data.TransactionHash = message.TransactionHash;

            await _scoringApplicationService.SetScoringTransactionAsync(message.ProjectId, message.TransactionHash, message.UserId);

            await context.SendLocal(new WaitForTransaction { TransactionHash = message.TransactionHash });
        }
示例#2
0
        public async Task <IActionResult> StartAsync([FromBody] StartProjectScoringRequest request)
        {
            var command = new StartScoring
            {
                ProjectId       = request.ProjectId,
                TransactionHash = request.TransactionHash,
                UserId          = User.GetUserId()
            };

            await _messageSession.SendLocal(command);

            return(NoContent());
        }