Exemplo n.º 1
0
        public async Task <ActionResult <Country> > DeleteCountry(int id)
        {
            short statusDelete = await _repo.DeleteCountryRepository(id);

            var country = await _repo.GetCountryRepository(id, null);

            if (statusDelete.Equals(1))
            {
                return(NotFound());
            }
            else if (statusDelete.Equals(2))
            {
                return(country);
            }
            else
            {
                return(BadRequest());
            }
        }