public HttpResponseMessage SaveProduct([FromBody]PricedProductDTO product) { return SafeAction(() => { IDelightServices service = new DelightServices(); int id = service.SaveProduct(product); if (id <= 0) { return Request.CreateResponse(HttpStatusCode.NoContent); } var response = Request.CreateResponse<int>(HttpStatusCode.OK, id); return response; }, product); }