public async void Search() { if (SearchText != String.Empty) { AllCountries = new ObservableCollection <Country>( AllCountries .Where(x => x.ID.Contains(_searchText) || x.CurrencyID.Contains(SearchText)) .ToList()); } else { await LoadCountries(); } }
public IEnumerable <ProvinceModel> GetAllProvinces() { return(BuildProvinceCollection(AllCountries.Where(x => x.Provinces.Any()))); }