public IActionResult GetCountry(int countryId) { if (!countryRepository.CoutryExist(countryId)) { return(NotFound()); } var countries = countryRepository.GetCountry(countryId); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var County = new CountryDTO() { id = countries.id, name = countries.name }; return(Ok(County)); }