public async Task <IActionResult> Edit(int id, [Bind("ID,Name,StreetAddress,City,State,Phone")] Hotels hotels) { if (id != hotels.ID) { return(NotFound()); } if (ModelState.IsValid) { try { await _hotels.UpdateHotels(id, hotels); } catch (DbUpdateConcurrencyException) { if (!HotelsExists(hotels.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(hotels)); }