public HttpResponseMessage DeleteIFRSTbill(HttpRequestMessage request, [FromBody] int tbillId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IFRSTbills ifrsTbill = _IFRSDataService.GetIFRSTbills(tbillId); if (ifrsTbill != null) { _IFRSDataService.DeleteIFRSTbills(tbillId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Tbill found under that ID."); } return response; })); }