public HttpResponseMessage ObtenerProducto(int idProducto) { try { var logica = new LNCriteriosSST(); var result = logica.ObtenerProducto(idProducto); if (result != null) { var response = Request.CreateResponse(HttpStatusCode.OK, result); return(response); } else { var response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { var response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }