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