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)); } }
public HttpResponseMessage GetProduct(int barcode) { return(Request.CreateResponse(HttpStatusCode.OK, _productManagement.GetProduct(barcode))); }