void AddGame(League league) { var serverGame = new ServerGame(); serverGame.League = league; serverGame.Time = new DateTime(2018, 1, 1, 12, 0, 0); var teamDatas = new System.Collections.Generic.List <GameTeamData>(); var teamData = new GameTeamData(); teamData.GameTeam = new GameTeam(); teamData.Players = new System.Collections.Generic.List <ServerPlayer>(); teamData.Players.Add(new ServerPlayer() { PlayerId = "001" }); teamData.Players.Add(new ServerPlayer() { PlayerId = "002" }); teamData.Players.Add(new ServerPlayer() { PlayerId = "003" }); teamDatas.Add(teamData); teamData = new GameTeamData(); teamData.GameTeam = new GameTeam(); teamData.Players = new System.Collections.Generic.List <ServerPlayer>(); teamData.Players.Add(new ServerPlayer() { PlayerId = "004" }); teamData.Players.Add(new ServerPlayer() { PlayerId = "nonexistent" }); teamDatas.Add(teamData); league.CommitGame(serverGame, teamDatas, GroupPlayersBy.Alias); league.AllGames[0].Teams[0].Colour = Colour.Red; league.AllGames[0].Teams[1].Colour = Colour.Green; }