public HttpResponseMessage DeleteIncomeCommFeeLineCaption(HttpRequestMessage request, [FromBody] int ICFLcaptionId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IncomeCommFeeLineCaption icfl = _MPRIncomeService.GetIncomeCommFeeLineCaption(ICFLcaptionId); if (icfl != null) { _MPRIncomeService.DeleteIncomeCommFeeLineCaption(ICFLcaptionId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No IncomeCommFeeLineCaption found under the ICFLcaptionId."); } return response; })); }