public async Task <IActionResult> Edit(int id, [Bind("Id,Name,DateUpdated")] CityDTO city) { if (id != city.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _dbAccess.EditCity(city); _dbAccess.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!CityExists(city.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(city)); }