private async Task LoadMusculeGroupsLookupAsync() { MusculeGroups.Clear(); //MusculeGroups.Add(new NullLookupItem { DisplayMember = " - " }); var lookup = await _musculeGroupLookupDataService.GetMusculeGroupLookupAsync(); foreach (var lookupItem in lookup) { MusculeGroups.Add(lookupItem); } }
public async override Task LoadAsync(int id) { Id = id; foreach (var wrapper in MusculeGroups) { wrapper.PropertyChanged -= Wrapper_PropertyChanged; } MusculeGroups.Clear(); var musculeGroups = await _musculeGroupRepository.GetAllAsync(); foreach (var model in musculeGroups) { var wrapper = new MusculeGroupWrapper(model); wrapper.PropertyChanged += Wrapper_PropertyChanged; MusculeGroups.Add(wrapper); } }