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

                LgdComputationResult lgdComputationResult = _IFRS9Service.GetLgdComputationResult(lgdComputationResultId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                LgdComputationResult lgdComputationResult = _IFRS9Service.GetLgdComputationResult(lgdComputationResultId);

                if (lgdComputationResult != null)
                {
                    _IFRS9Service.DeleteLgdComputationResult(lgdComputationResultId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateLgdComputationResult(HttpRequestMessage request, [FromBody] LgdComputationResult lgdComputationResultModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var lgdComputationResult = _IFRS9Service.UpdateLgdComputationResult(lgdComputationResultModel);

                return request.CreateResponse <LgdComputationResult>(HttpStatusCode.OK, lgdComputationResult);
            }));
        }