public IActionResult Edit(int?id) { if (id == null || id == 0) { return(NotFound()); } var country = countryManager.FindById((int)id); if (country == null) { return(NotFound()); } return(View(country)); }
public void FindCountryByIdTest() { var countryManager = new CountryManager(new CountryRepository(new ListsDbContext())); var country = countryManager.FindById(1); Assert.IsNotNull(country, "Country not found."); }