Beispiel #1
0
        public async Task Create_Valid_NotNull()
        {
            var league = LeagueUtility.CreateLeague(dbContext);

            var season = await testObj.Create(league.ID, StartDate, EndDate);

            Assert.IsNotNull(season);
        }
Beispiel #2
0
        public virtual ActionResult Create(SeasonViewModel model)
        {
            if (ModelState.IsValid)
            {
                var season = new Season()
                {
                    SeasonId = model.SeasonId,
                    Years    = model.Years
                };

                _seasonService.Create(season);

                return(RedirectToAction(MVC.Admin.Seasons.Index()));
            }

            return(View(model));
        }