protected string GetType(TournamentModel tournoi)
        {
            if (tournoi is EliminationTournamentModel)
                return "Elimination";
            if (tournoi is PoolEliminationTournamentModel)
                return "PoolElimination";
            if (tournoi is PoolTournamentModel)
                return "Pool";
            if (tournoi is RoundTournamentModel)
                return "Round";

            throw new ApplicationException("Type de tournoi non reconnu");
        }
        private static void From(TournamentModel tournamentModel, Tournament tournament)
        {
            if (tournament == null)
                return;

                tournamentModel.Type = tournament.Type;
                tournamentModel.CreatorId = tournament.CreatorId;
                tournamentModel.Creator = PlayerModel.From(tournament.Creator);
                tournamentModel.Date = tournament.Date;
                tournamentModel.Id = tournament.Id;
                tournamentModel.Name = tournament.Name;
                tournamentModel.Private = tournament.Private;
                tournamentModel.Ranked = tournament.Ranked;
                tournamentModel.Randomize = tournament.Randomize;
                tournamentModel.SportKey = tournament.SportKey;
                tournamentModel.WinnerId = tournament.WinnerId;
                tournamentModel.Teams = tournament.Teams.Select(TeamModel.From).ToList();
                tournamentModel.State = tournament.State;
            tournamentModel.Qualifications = tournament.Qualifications.Select(QualificationModel.From).ToList();
        }