public HttpResponseMessage Deleteprymoratorium(HttpRequestMessage request, [FromBody] int loanPryMoratoriumId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data LoanPryMoratorium loanprymoratorium = _IFRSDataService.GetLoanPryMoratorium(loanPryMoratoriumId); if (loanprymoratorium != null) { _IFRSDataService.DeleteLoanPryMoratorium(loanPryMoratoriumId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No LoanMoratoriumData found under that ID."); } return response; })); }