예제 #1
0
        public HttpResponseMessage GetProduct(int barcode)
        {
            Product product = _productManagement.GetProduct(barcode);

            if (product != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, product));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
            }
        }
예제 #2
0
 public HttpResponseMessage GetProduct(int barcode)
 {
     return(Request.CreateResponse(HttpStatusCode.OK, _productManagement.GetProduct(barcode)));
 }