public Output Process(IMessage input, IMessageContext model)
        {
            var ctx_model = model as TournamentRoundQueryContextModel;

            var round = new Round()
            {
                Id           = ctx_model.Id,
                TournamentId = ctx_model.Tournament_Id,
                Name         = TournamentMapper.Round_name(ctx_model.Count),
                Matches      = ctx_model.Matches.Select(match => TournamentMapper.Map(match))
            };

            return(new QueryOutput(new TournamentRoundQueryResult()
            {
                Round = round
            }));
        }
        private Tournament Map(TournamentQueryContextModel ctx_model)
        {
            return(new Tournament()
            {
                Id = ctx_model.Id,
                Name = ctx_model.Name,
                Created = ctx_model.Created,
                Options = new Options()
                {
                    Tables = ctx_model.Tables,
                    Sets = ctx_model.Sets,
                    Points = ctx_model.Points,
                    PointsDrawn = ctx_model.Points_drawn,
                    Drawn = ctx_model.Drawn,
                    Walkover = ctx_model.Walkover
                },

                Rounds = ctx_model.Rounds.Select(r => TournamentMapper.Map(r, ctx_model.Id))
            });
        }