public async Task <IActionResult> Edit(int id, [Bind("Id,Name,info_hotline,world_category,year_formed")] Country country) { if (id != country.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(country); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CountryExists(country.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(country)); }