public async override Task InitializeAsync(INavigation navigation) { await base.InitializeAsync(navigation); Foods.Clear(); Foods.AddRange(await DataStore.FoodEntries.Get()); }
public async void ExecuteLoadFoodsCommand() { if (IsBusy) { return; } IsBusy = true; LoadFoodsCommand.ChangeCanExecute(); Foods.Clear(); Foods.AddRange(await _DataClient.GetFoodsAsync()); IsBusy = false; LoadFoodsCommand.ChangeCanExecute(); }
private void LoadDataAsync() => Task.Run(() => Foods.AddRange(_foodService.GetAll()));