Beispiel #1
0
        public void UpdateOldGames(DateTime startDate, DateTime endDate)
        {
            ReadDataWeb dataWeb = new ReadDataWeb();

            startDate = startDate.AddDays(-1);
            this.lastGamesForUpdate = dataWeb.ReadDataFromWeb(startDate, endDate);

            AddLastGamesForUpdateToDb(this.lastGamesForUpdate);
        }
Beispiel #2
0
        public void MakeAnalyzesForNextGames(DateTime lastDateGame, DateTime endDate, DateTime nextGamesDate)
        {
            // Read old games without results from soccerway.com
            ReadDataWeb dataWeb = new ReadDataWeb();

            this.lastGamesForUpdate = dataWeb.ReadDataFromWeb(lastDateGame, endDate);

            AddLastGamesForUpdateToDb(this.lastGamesForUpdate);

            // Read next games from soccerway.com
            ReadNextGames nextGamesDataWeb = new ReadNextGames();

            var existGamesFromNextDate = this.db
                                         .FootballGames
                                         .Any(g => g.MatchDate.Date == nextGamesDate.Date);

            if (!existGamesFromNextDate)
            {
                this.nextGames = nextGamesDataWeb.ReadDataFromWeb(nextGamesDate);

                AddLastGamesForUpdateToDb(this.nextGames);
            }
        }