public HttpResponseMessage DeleteIncomeProductsTable(HttpRequestMessage request, [FromBody] int productid) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IncomeProductsTable ipt = _MPRIncomeService.Getincomeproducttable(productid); if (ipt != null) { _MPRIncomeService.Deleteincomeproducttable(productid); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No IncomeProduct found under the productid."); } return response; })); }