public HttpResponseMessage DeleteIFRSProduct(HttpRequestMessage request, [FromBody] int productId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IFRSProduct product = _LoanService.GetIFRSProduct(productId); if (product != null) { _LoanService.DeleteIFRSProduct(productId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No product found under that ID."); } return response; })); }