in ContosoApp/ViewModels/MainViewModel.cs [76:95]
public async Task GetCustomerListAsync()
{
await dispatcherQueue.EnqueueAsync(() => IsLoading = true);
var customers = await App.Repository.Customers.GetAsync();
if (customers == null)
{
return;
}
await dispatcherQueue.EnqueueAsync(() =>
{
Customers.Clear();
foreach (var c in customers)
{
Customers.Add(new CustomerViewModel(c));
}
IsLoading = false;
});
}