示例#1
0
 public ActionResult Get(string busqueda = "")
 {
     try
     {
         var retorno   = _mapper.Map <List <ClienteList> >(_logica.Listar(busqueda));
         var respuesta = new Response <IEnumerable <ClienteList> >(retorno, 200);
         if (retorno.Count > 0)
         {
             return(Ok(retorno));
         }
         else
         {
             return(NoContent());
         }
     }
     catch (ExcepcionLogica ex)
     {
         return(BadRequest(ex));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex));
     }
 }