private async void DoRefresh(object obj) { Loading = true; Workflows = new ObservableCollection <QueryWorkflowVM>(); Workflows.CollectionChanged += Workflows_CollectionChanged; try { var result = await RestHub.QueryWorkflows(); if (result.UserObject != null) { List <QueryWorkflowUserDTO> dto = result.UserObject as List <QueryWorkflowUserDTO>; if (dto != null) { foreach (var username in Usernames) { var workflow = dto.Where(w => w.L1User == username).FirstOrDefault(); Workflows.Add(new QueryWorkflowVM { L1user = username, L2user = workflow?.L2User, L3user = workflow?.L3User, L4user = workflow?.L4User, L5user = workflow?.L5User, }); } Workflows.UpdateDisplayOrder(); } } else { MessageBox.Show("Can't Load Users . ."); } } catch (Exception ex) { AppErrorBox.ShowErrorMessage("Error While Loading Users . .", ex.ToString()); } Loading = false; }