public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Address,Classif,Rating")] Kults kults) { if (id != kults.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(kults); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KultsExists(kults.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(kults)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Address,SrChek,Lamp,Rating")] Lounge lounge) { if (id != lounge.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(lounge); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LoungeExists(lounge.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(lounge)); }