public bool CheckCountryCodeAvailable(int?id, string code) { bool blnAvailable = true; var country = countryRepository.CheckCountryCodeAvailable(id, code); if (country.Any()) { blnAvailable = false; } return(blnAvailable); }