예제 #1
0
        public async Task RunLeagueReportAsync()
        {
            //return RedirectToAction(nameof(StatsBySubDivision));
            var staleState = await _wpbService.GetStatsAllAsync();

            var freshState = await GetTeamStatsResultsAsync();

            //  purge old team stats
            await PurgeStatTable(staleState);

            await UpdateStatTable(freshState);

            //  add new report tracker object
            var newReportRun = new ReportTracker()
            {
                ReportTypeCode = ModelHelpers.REPORT_STAT
            };
            await _wpbService.CreateReportHistory(newReportRun);
        }