public HttpResponseMessage DeleteIfrsCustomer(HttpRequestMessage request, [FromBody] int ifrsCustomerId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IfrsCustomer ifrscustomer = _IFRSDataService.GetIfrsCustomer(ifrsCustomerId); if (ifrscustomer != null) { _IFRSDataService.DeleteIfrsCustomer(ifrsCustomerId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Bonds found under that ID."); } return response; })); }