예제 #1
0
        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));
        }
예제 #2
0
        public void FindCountryByIdTest()
        {
            var countryManager = new CountryManager(new CountryRepository(new ListsDbContext()));
            var country        = countryManager.FindById(1);

            Assert.IsNotNull(country, "Country not found.");
        }