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

                PlacementEclComputationResult placementEclComputationResult = _IFRS9Service.GetPlacementEclComputationResult(placementEclComputationResultId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                PlacementEclComputationResult placementEclComputationResult = _IFRS9Service.GetPlacementEclComputationResult(placementEclComputationResultId);

                if (placementEclComputationResult != null)
                {
                    _IFRS9Service.DeletePlacementEclComputationResult(placementEclComputationResultId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdatePlacementEclComputationResult(HttpRequestMessage request, [FromBody] PlacementEclComputationResult placementEclComputationResultModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var placementEclComputationResult = _IFRS9Service.UpdatePlacementEclComputationResult(placementEclComputationResultModel);

                return request.CreateResponse <PlacementEclComputationResult>(HttpStatusCode.OK, placementEclComputationResult);
            }));
        }