private void SyncTeamsAndMatches(GetClubTeamsResponse frenoyTeams)
        {
            foreach (var frenoyTeam in frenoyTeams.TeamEntries)
            {
                // Create new division for each team in the club
                // Check if it already exists: Two teams could play in the same division
                TeamEntity teamEntity = _db.Teams.SingleOrDefault(x => x.FrenoyDivisionId.ToString() == frenoyTeam.DivisionId && x.TeamCode == frenoyTeam.Team);
                if (teamEntity == null)
                {
                    teamEntity = CreateTeam(frenoyTeam);
                    _db.Teams.Add(teamEntity);
                    CommitChanges();

                    // Create the teams in the new division=reeks
                    var frenoyDivision = _frenoy.GetDivisionRanking(new GetDivisionRankingRequest
                    {
                        DivisionId = frenoyTeam.DivisionId
                    });
                    foreach (var frenoyTeamsInDivision in frenoyDivision.RankingEntries.Where(x => ExtractTeamCodeFromFrenoyName(x.Team) != frenoyTeam.Team || !IsOwnClub(x.TeamClub)))
                    {
                        var teamOpponent = CreateTeamOpponent(teamEntity, frenoyTeamsInDivision);
                        _db.TeamOpponents.Add(teamOpponent);
                    }
                    CommitChanges();
                }

                SyncTeamMatches(teamEntity);
            }
        }
        private async Task SyncTeamsAndMatches(GetClubTeamsResponse frenoyTeams)
        {
            foreach (var frenoyTeam in frenoyTeams.TeamEntries)
            {
                // Create new division for each team in the club
                // Check if it already exists: Two teams could play in the same division
                TeamEntity teamEntity = _db.Teams.SingleOrDefault(x => x.FrenoyDivisionId.ToString() == frenoyTeam.DivisionId && x.TeamCode == frenoyTeam.Team);
                if (teamEntity == null)
                {
                    teamEntity = CreateTeam(frenoyTeam);
                    _db.Teams.Add(teamEntity);
                    await CommitChanges();

                    // Create the teams in the new division=reeks
                    var frenoyDivision = await _frenoy.GetDivisionRankingAsync(new GetDivisionRankingRequest
                    {
                        DivisionId = frenoyTeam.DivisionId
                    });

                    foreach (var frenoyTeamsInDivision in frenoyDivision.GetDivisionRankingResponse.RankingEntries.Where(x => ExtractTeamCodeFromFrenoyName(x.Team) != frenoyTeam.Team || !IsOwnClub(x.TeamClub)))
                    {
                        var teamOpponent = await CreateTeamOpponent(teamEntity, frenoyTeamsInDivision);

                        _db.TeamOpponents.Add(teamOpponent);
                    }
                    await CommitChanges();
                }

                await SyncTeamMatches(teamEntity);
            }
        }