private void ExecuteRefreshListCommand() { IsRefreshing = true; var collaboratorService = new CollaboratorService(); var phoneCongregationService = new PhoneCongregationService(); var usefulPhoneService = new UsefulPhoneService(); Task.Run(async() => { try { UserDialogs.Instance.ShowLoading(AppSettings.WaitingText, MaskType.Black); collaboratorService.CleanCollaborators(); usefulPhoneService.CleanUsefulPhones(); phoneCongregationService.CleanPhoneCongregations(); Collaborators = new List <Collaborator>(await collaboratorService.GetAllCollaboratorsFromApi()); UsefulPhones = new List <UsefulPhone>(await usefulPhoneService.GetAllUsefulPhonesFromApi()); PhoneCongregations = new List <PhoneCongregation>(await phoneCongregationService.GetAllPhonesFromApi()); CollaboratorsList = ListCollaborator(string.Empty); RaisePropertyChanged(nameof(Collaborators)); RaisePropertyChanged(nameof(UsefulPhones)); RaisePropertyChanged(nameof(PhoneCongregations)); SearchText = string.Empty; UserDialogs.Instance.HideLoading(); DefaultToasts.Success("Dados atualizados com sucesso."); IsRefreshing = false; } catch (Exception ex) { DefaultToasts.Error(ex.Message); UserDialogs.Instance.HideLoading(); IsRefreshing = false; } }); }