示例#1
0
        private async void RefreshCoffees()
        {
            IsBusy = true;

            try
            {
                List <Coffee> coffees = await repository.GetAllCoffeesAsync();

                Coffees = new ObservableCollection <Coffee>(coffees);
            }
            catch (Exception e)
            {
                Debug.Write(e);
            }
            finally
            {
                IsBusy = false;
            }
        }