public async void ExecuteLoadEmployeeCommand() { try { EmployeeList.Clear(); var employees = await DataStoreEmp.GetAllAsync(); foreach (var item in employees) { EmployeeList.Add(item); } int nb = EmployeeList.Count; } catch (Exception ex) { Debug.WriteLine(ex); } }
public async void GetData() { EmployeeList.Clear(); var emplist = await DataStoreEmp.GetAllAsync(); foreach (Employee e in emplist) { EmployeeList.Add(e); } }
public async Task ExecuteLoadItemsCommand() { try { EmployeeList.Clear(); var employees = await DataStoreEmp.GetAllAsync(); foreach (var item in employees) { EmployeeList.Add(item); } int nb = EmployeeList.Count; Console.WriteLine("Employee Number= " + nb); } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }