Exemple #1
0
        public IHttpActionResult Get(int id)
        {
            //[dbo].[RET_PRODUCTO_PR]
            try
            {
                var mng      = new ProductosManager();
                var producto = new Productos
                {
                    CODIGO = id
                };

                producto        = mng.RetrieveById(producto);
                apiResp         = new ApiResponse();
                apiResp.Data    = producto;
                apiResp.Message = "Successful";
                return(Ok(apiResp));
            }
            catch (BussinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }