public IActionResult Store_match_result(MatchResultNotificationCommand match_result_command)
        {
            var results = string.Join(" ", match_result_command.Results);

            _logger.LogInformation($"match result command, match: {match_result_command.MatchId}, result notification: { results }");

            using (var msgpump = new MessagePump(_es))
            {
                var context_manager   = new StoreMatchResultCommandContextManager(_es);
                var message_processor = new StoreMatchResultCommandProcessor();
                msgpump.Register <MatchResultNotificationCommand>(context_manager, message_processor);

                var result = msgpump.Handle(match_result_command) as CommandStatus;
                if (result is Success)
                {
                    return(Ok());
                }
                else
                {
                    return(BadRequest());
                }
            }
        }
        private Event Map_match_result(StoreMatchResultCommandContextModel ctx_model, MatchResultNotificationCommand cmd)
        {
            var match_result_data = new MatchResultData()
            {
                Match_id = cmd.MatchId,
                Results  = cmd.Results.Select(result => (events.data.SetResult)result).ToList()
            };

            return(new MatchPlayed(nameof(MatchPlayed),
                                   new TournamentContext(ctx_model.Tournament_id, nameof(TournamentContext)), match_result_data));
        }