Example #1
0
 public ApplicationResponse <BuscaContatoResponse> BuscaContato(BuscaContatoRequest request)
 {
     try
     {
         return(new ApplicationResponse <BuscaContatoResponse>(new BuscaContatoResponse()
         {
             ListaContatos = _contatoService.BuscaContato(request.QuantidadeRegistro, request.Busca).ToArray()
         }, ApplicationResponseStatus.Success, "Sucesso na busca de contatos"));
     }
     catch (Exception ex)
     {
         return(new ApplicationResponse <BuscaContatoResponse>(
                    null,
                    ApplicationResponseStatus.Error, "Erro na busca de contatos"
                    ));
     }
 }