public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Email,Telephone,Birthday,IdTravelRoute")] User userModel) { if (id != userModel.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserModelExists(userModel.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userModel)); }