Ejemplo n.º 1
0
 public ListarTodosProductoResponse ListarTodos()
 {
     try
     {
         var response = new ListarTodosProductoResponse();
         var bc       = new ProductoBLL();
         response.Result = bc.ListarTodos();
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422, // UNPROCESSABLE ENTITY
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 2
0
        public List <Producto> ListarTodos()
        {
            ProductoBLL ProductoBLL = new ProductoBLL();

            return(ProductoBLL.ListarTodos());
        }