public static void Main()
        {
            using (var db = new FootballEntities())
            {
                var xml = XDocument.Load("../../../Helper.Files/leagues-and-teams.xml");
                var counter = 1;
                foreach (var league in xml.Descendants("league"))
                {
                    Console.WriteLine("Processing league #{0} ...", counter++);
                    var currentLeague = GetOrCreateLeague(league, db);
                    foreach (var team in league.Descendants("team"))
                    {
                        if (team.Attribute("name") == null)
                        {
                            Console.WriteLine("Missing team name attribute.");
                            continue;
                        }

                        var currentTeam = GetOrCreateTeam(team, db);
                        AddTeamToLeague(currentTeam, currentLeague);
                    }

                    db.SaveChanges();
                    Console.WriteLine();
                }
            }
        }
        private static void SaveMatchToDb(string leagueName, string homeTeam, string awayTeam, int homeTeamGoals, int awayTeamGoals, DateTime matchDate)
        {
            using (var db = new FootballEntities())
            {
                db.TeamMatches.Add(new TeamMatch
                {
                    League = db.Leagues.FirstOrDefault(l => l.LeagueName == leagueName),
                    HomeTeam = db.Teams.FirstOrDefault(t => t.TeamName == homeTeam),
                    AwayTeam = db.Teams.FirstOrDefault(t => t.TeamName == awayTeam),
                    HomeGoals = homeTeamGoals,
                    AwayGoals = awayTeamGoals,
                    MatchDate = matchDate
                });

                db.SaveChanges();
            }
        }