private void InitializeFuelTypes() { FuelTypes.CollectionChanged -= _CollectionChanged; FuelTypes.Clear(); foreach (FuelType fuelType in context.FuelTypes) { FuelTypes.Add(fuelType); } FuelTypes.CollectionChanged += _CollectionChanged; }
private async Task LoadFuelTypesLookupAsync() { FuelTypes.Clear(); FuelTypes.Add(new NullLookupItem { DisplayMember = "-" }); var lookup = await this.fuelTypeLookupDataService.GetFuelTypeLookupAsync(); foreach (var lookupItem in lookup) { FuelTypes.Add(lookupItem); } }