public async Task <IActionResult> Edit(int id, [Bind("Id,ArenaNumber,ArenanName,ArenanAddress,ArenanZipCode,ArenanCity,ArenanCountry,ArenanDistrict,ArenanCategory,ArenanPhoneNumbers,ArenanCapacity,ArenanStanding,ArenanBench,ArenanChair,ArenanSoftChair,ArenanHandicapSlots,ArenanBuildYear,ArenanReBuildYear,ArenanLatestInspected,ArenanLastChecked")] SIFArena sIFArena) { if (id != sIFArena.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sIFArena); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SIFArenaExists(sIFArena.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sIFArena)); }
public async Task <IActionResult> Create([Bind("Id,ArenaNumber,ArenanName,ArenanAddress,ArenanZipCode,ArenanCity,ArenanCountry,ArenanDistrict,ArenanCategory,ArenanPhoneNumbers,ArenanCapacity,ArenanStanding,ArenanBench,ArenanChair,ArenanSoftChair,ArenanHandicapSlots,ArenanBuildYear,ArenanReBuildYear,ArenanLatestInspected,ArenanLastChecked")] SIFArena sIFArena) { if (ModelState.IsValid) { _context.Add(sIFArena); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sIFArena)); }