public async Task <IActionResult> Create([Bind("HitRangeHeroID,NameHitRangeHero")] HitRangeHero hitRangeHero) { if (ModelState.IsValid) { _context.Add(hitRangeHero); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(hitRangeHero)); }
public async Task <IActionResult> Create([Bind("RoleSkinID,NameRoleSkin")] RoleSkin roleSkin) { if (ModelState.IsValid) { _context.Add(roleSkin); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(roleSkin)); }
public async Task <IActionResult> Create([Bind("SkinHeroID,NameSkinHero,DescriptionSkinHero,HeroID")] SkinHero skinHero) { if (ModelState.IsValid) { _context.Add(skinHero); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["HeroID"] = new SelectList(_context.HeroLols, "HeroID", "HeroID", skinHero.HeroID); return(View(skinHero)); }
public async Task <IActionResult> Create([Bind("HeroID,NameHero,HitRangeHeroID")] HeroLol heroLol) { if (ModelState.IsValid) { _context.Add(heroLol); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["HitRangeHeroID"] = new SelectList(_context.HitRangeHeros, "HitRangeHeroID", "HitRangeHeroID", heroLol.HitRangeHeroID); return(View(heroLol)); }
public async Task <IActionResult> Create([Bind("PropertyID,NamePoperty,RateProperty,HeroID")] PropertyHero propertyHero) { if (ModelState.IsValid) { _context.Add(propertyHero); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["HeroID"] = new SelectList(_context.HeroLols, "HeroID", "HeroID", propertyHero.HeroID); return(View(propertyHero)); }
public async Task <IActionResult> Create([Bind("HeroID,RoleSkinID")] RoleSkinHero roleSkinHero) { if (ModelState.IsValid) { _context.Add(roleSkinHero); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["HeroID"] = new SelectList(_context.HeroLols, "HeroID", "HeroID", roleSkinHero.HeroID); ViewData["RoleSkinID"] = new SelectList(_context.RoleSkins, "RoleSkinID", "RoleSkinID", roleSkinHero.RoleSkinID); return(View(roleSkinHero)); }
public async Task <IActionResult> AddOrEdit([Bind("DescriptionHeroID,NameDescriptionHero,DescriptionOfHero,HeroID")] DescriptionHero descriptionHero) { if (ModelState.IsValid) { if (descriptionHero.DescriptionHeroID == 0) { _context.Add(descriptionHero); } else { _context.Update(descriptionHero); } await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["HeroID"] = new SelectList(_context.HeroLols, "HeroID", "HeroID", descriptionHero.HeroID); return(View(descriptionHero)); }