public HttpResponseMessage GetBondEclComputationResult(HttpRequestMessage request, int bondEclComputationResultId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                BondEclComputationResult bondEclComputationResult = _IFRS9Service.GetBondEclComputationResult(bondEclComputationResultId);

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

                return response;
            }));
        }
        public HttpResponseMessage DeleteBondEclComputationResult(HttpRequestMessage request, [FromBody] int bondEclComputationResultId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                BondEclComputationResult bondEclComputationResult = _IFRS9Service.GetBondEclComputationResult(bondEclComputationResultId);

                if (bondEclComputationResult != null)
                {
                    _IFRS9Service.DeleteBondEclComputationResult(bondEclComputationResultId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateBondEclComputationResult(HttpRequestMessage request, [FromBody] BondEclComputationResult bondEclComputationResultModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var bondEclComputationResult = _IFRS9Service.UpdateBondEclComputationResult(bondEclComputationResultModel);

                return request.CreateResponse <BondEclComputationResult>(HttpStatusCode.OK, bondEclComputationResult);
            }));
        }