示例#1
0
        // GET: Countries/Delete/5
        public async Task <IActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            Country country = await _countries.GetByIdAsync((int)id);

            if (country == null)
            {
                return(NotFound());
            }

            var pais = await _countries.GetByIdAsync((int)id);

            await _countries.DeleteAsync(pais);

            return(RedirectToAction("Index", "Countries"));
        }