Пример #1
0
        public HttpResponseMessage UpdateloanDetail(HttpRequestMessage request, [FromBody] RawLoanDetails loanDetailModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var loanDetail = _IFRSDataService.UpdateRawLoanDetails(loanDetailModel);

                return request.CreateResponse <RawLoanDetails>(HttpStatusCode.OK, loanDetail);
            }));
        }
Пример #2
0
        public HttpResponseMessage GetLoanDetails(HttpRequestMessage request, int loanDetails)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                RawLoanDetails rawloandetail = _IFRSDataService.GetRawLoanDetails(loanDetails);

                // notice no need to create a seperate model object since Setup entity will do just fine
                response = request.CreateResponse <RawLoanDetails>(HttpStatusCode.OK, rawloandetail);

                return response;
            }));
        }
Пример #3
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;
            }));
        }
Пример #4
0
 public RawLoanDetails UpdateRawLoanDetails(RawLoanDetails loanDetails)
 {
     return(Channel.UpdateRawLoanDetails(loanDetails));
 }