public HttpResponseMessage DeletePLIncomeReportAdjustment(HttpRequestMessage request, [FromBody] int plIncomeReportAdjustmentId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data PLIncomeReportAdjustment plIncomeReportAdjustment = _MPRPLService.GetPLIncomeReportAdjustment(plIncomeReportAdjustmentId); if (plIncomeReportAdjustment != null) { _MPRPLService.DeletePLIncomeReportAdjustment(plIncomeReportAdjustmentId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No plIncomeReportAdjustment found under that ID."); } return response; })); }