public HttpResponseMessage DeleteprodName(string prodName) { ProductQuery pq = new ProductQuery(); HttpResponseMessage response; bool ret = pq.DeleteProduct(prodName, "prodName"); if (ret) { response = Request.CreateResponse(HttpStatusCode.NoContent); } else { response = Request.CreateResponse(HttpStatusCode.NotFound); } return(response); }
public HttpResponseMessage DeleteinStock(string inStock) { ProductQuery pq = new ProductQuery(); HttpResponseMessage response; bool ret = pq.DeleteProduct(inStock, "inStock"); if (ret) { response = Request.CreateResponse(HttpStatusCode.NoContent); } else { response = Request.CreateResponse(HttpStatusCode.NotFound); } return(response); }
// DELETE: api/Product/5 public HttpResponseMessage Delete(int id) { ProductQuery pq = new ProductQuery(); HttpResponseMessage response; bool ret = pq.DeleteProduct(Convert.ToString(id), "prodID"); if (ret) { response = Request.CreateResponse(HttpStatusCode.NoContent); } else { response = Request.CreateResponse(HttpStatusCode.NotFound); } return(response); }