public IHttpActionResult Update(Product _objProduct) { if (_objProduct == null || _objProduct.ID == 0) { return(BadRequest()); } var data = _objContext.GetProductByID(_objProduct.ID); if (data == null) { return(NotFound()); } _objContext.UpdateProduct(_objProduct); //return Content(HttpStatusCode.NoContent, ""); return(Ok(_objProduct)); }