public async Task <IActionResult> Create([Bind("ChampId,ChampName,ChampRole,ChampPrice,ChampResource,Lore,ChampReleaseDate,ChampImage")] Champion champion) { if (ModelState.IsValid) { _context.Add(champion); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(champion)); }
public async Task <IActionResult> Create([Bind("StatId,ChampId,WinRate,PickRate,BanRate,Tier,LanePlayed")] ChampStat champStat) { if (ModelState.IsValid) { _context.Add(champStat); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ChampId"] = new SelectList(_context.Champion, "ChampId", "ChampId", champStat.ChampId); return(View(champStat)); }