コード例 #1
0
        public void ResultsBySeasonCollection_CollectionsAreEqual_True()
        {
            var fixtures = _fixture2016To2017.GetSeasonResults(_db);

            var fixturesFromDb = _db.Fixtures.Where(x => x.FixtureDate > new DateTime(2016, 7, 1))
                                 .OrderBy(x => x.FixtureDate);

            CollectionAssert.AreEqual(fixtures, fixturesFromDb);
        }
コード例 #2
0
        public ActionResult ResultsSeason2016_2017(string id)
        {
            var fixtureData = new FixtureData();

            if (id == "getRecentResults")
            {
                var scrapedFixtures = fixtureData.GetFixturesAndResults;

                ViewData["ResultsWithoutSpreadSuccessRate"] =
                    new FixtureData().GetResultsWithoutSpreadsPredictionSuccessRate;

                return(View(scrapedFixtures.ToList().OrderByDescending(x => x.FixtureDate)));
            }

            var results        = new ResultsSeason2016_2017();
            var orderedResults = results.GetSeasonResults(_db).ToList().OrderByDescending(x => x.FixtureDate);

            ViewData["ResultsWithoutSpreadSuccessRate"] = new FixtureData().GetResultsWithoutSpreadsPredictionSuccessRate;


            return(View(orderedResults));
        }