示例#1
0
        public async Task <IActionResult> Create([Bind("Id,FixtureDateTime,Home,HomeScore,Away,AwayScore,Result,Group")] Fixture fixture)
        {
            if (ModelState.IsValid)
            {
                _fixtureRepository.Add(fixture);
                await _fixtureRepository.SaveChanges();

                return(RedirectToAction(nameof(Index)));
            }
            return(RedirectToAction("Index", "Admin"));
        }