private void RefreshStreets(CityDto city, ServiceCompanyDto company) { StreetList.Clear(); if (city == null) { return; } RequestService.GetStreets(city.Id, company?.Id).ToList().ForEach(s => StreetList.Add(s)); }
private void ChangeCity(int?cityId) { StreetList.Clear(); if (!cityId.HasValue) { return; } foreach (var street in _requestService.GetStreets(cityId.Value).OrderBy(s => s.Name)) { StreetList.Add(street); } OnPropertyChanged(nameof(StreetList)); }