Пример #1
0
        public List <string> GetStateList(string country)
        {
            var provinces = CountryProvinces.FirstOrDefault(p => p.CountryName == country)?.Provinces;

            StateList = provinces?.Select(p => (string)p.ProvinceName).Distinct().ToList();
            return(StateList);
        }
Пример #2
0
 private void GetStateList()
 {
     if (!string.IsNullOrEmpty(CountryName))
     {
         var provinces = CountryProvinces.FirstOrDefault(p => p.CountryName == CountryName)?.Provinces;
         StateList = provinces?.Select(p => (string)p.ProvinceName).Distinct().ToList();
     }
 }