internal ParticipanteLista AdicionarParticipante(ParticipanteLista participante)
 {
     if (Members?.FirstOrDefault(x => participante.IdUser == x.IdUser) == null)
     {
         participante.NomeLista = Name;
         Members?.Add(participante);
     }
     PersistListaCompra.ChangeCanExecute();
     return(participante);
 }
        internal async Task ExcluirParticipanteListaCompraAsync(ParticipanteLista membro)
        {
            membro.Delete = true;
            await participantesRepository.UpdateEntityAsync(membro); //notify ser and delete on server

            await participantesRepository.SyncDataBaseAsync();

            await participantesRepository.DeleteEntityAsync(membro);

            await participantesRepository.SyncDataBaseAsync();
        }
        private async void ExecuteRemoverParticipanteSelecionadoAsync()
        {
            if (Members.Count >= 1)
            {
                editListaCompraDetalheViewModel.Members.Remove(participanteListaCompra);
                Members.Remove(participanteListaCompra);
                await listaCompraService.ExcluirParticipanteListaCompraAsync(participanteListaCompra);

                participanteListaCompra = null;
                AtualizarStatus();
            }
        }
 private void ExecuteStoreParticipanteAsync(ParticipanteLista participante)
 {
     if (CachedList.Count > 0)
     {//está pesquisando
         Members.Add(editListaCompraDetalheViewModel.AdicionarParticipante(participante));
         CachedList.Add(participante);
         SearchText = string.Empty;
         AtualizarStatus();
         return;
     }
     this.participanteListaCompra = participante;
     RemoverParticipanteSelecionadoCommand.ChangeCanExecute();
 }