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

                // not that calling the WCF service here will authenticate access to the data
                LoanPry loanpry = _IFRSDataService.GetLoanPry(pryId);

                if (loanpry != null)
                {
                    _IFRSDataService.DeleteLoanPry(pryId);

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

                return response;
            }));
        }