public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] SunRisesHyderabad sunRisesHyderabad) { if (id != sunRisesHyderabad.Player) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sunRisesHyderabad); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SunRisesHyderabadExists(sunRisesHyderabad.Player)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sunRisesHyderabad)); }
public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] KolkataKnightRider kolkataKnightRider) { if (id != kolkataKnightRider.Player) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(kolkataKnightRider); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KolkataKnightRiderExists(kolkataKnightRider.Player)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(kolkataKnightRider)); }
public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,Matches,Catches")] TopFielder topFielder) { if (id != topFielder.Player) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(topFielder); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TopFielderExists(topFielder.Player)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(topFielder)); }
public async Task <IActionResult> Edit(int id, [Bind("MatchId,Team1,Team2,Result")] Match match) { if (id != match.MatchId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(match); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchExists(match.MatchId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(match)); }
public async Task <IActionResult> Edit(string id, [Bind("TeamId,Teams,Matches,Won,Lost,Tied,Points,Nrr,Nrrposition")] PointsTable pointsTable) { if (id != pointsTable.Teams) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pointsTable); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PointsTableExists(pointsTable.Teams)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pointsTable)); }
public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] ChennaiSuperKing chennaiSuperKing) { if (id != chennaiSuperKing.Player) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(chennaiSuperKing); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChennaiSuperKingExists(chennaiSuperKing.Player)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(chennaiSuperKing)); }
public async Task <IActionResult> Edit(string id, [Bind("PlayerId,Player,PlayerRole,Price")] RoyalChallengersBanglore royalChallengersBanglore) { if (id != royalChallengersBanglore.Player) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(royalChallengersBanglore); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RoyalChallengersBangloreExists(royalChallengersBanglore.Player)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(royalChallengersBanglore)); }