示例#1
0
        public HttpResponseMessage DeleteloanDetail(HttpRequestMessage request, [FromBody] int loanDetails)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                RawLoanDetails rawloandetail = _IFRSDataService.GetRawLoanDetails(loanDetails);

                if (rawloandetail != null)
                {
                    _IFRSDataService.DeleteRawLoanDetails(loanDetails);

                    response = request.CreateResponse(HttpStatusCode.OK);
                }
                else
                {
                    response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No LoanPrimaryData found under that ID.");
                }

                return response;
            }));
        }