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

                MacrovariableEstimate macrovariableEstimate = _IFRS9Service.GetMacrovariableEstimate(MacrovariableEstimate_Id);

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

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

                // not that calling the WCF service here will authenticate access to the data
                MacrovariableEstimate macrovariableEstimate = _IFRS9Service.GetMacrovariableEstimate(MacrovariableEstimate_Id);

                if (macrovariableEstimate != null)
                {
                    _IFRS9Service.DeleteMacrovariableEstimate(MacrovariableEstimate_Id);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateMacrovariableEstimate(HttpRequestMessage request, [FromBody] MacrovariableEstimate macrovariableEstimateModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var macrovariableEstimate = _IFRS9Service.UpdateMacrovariableEstimate(macrovariableEstimateModel);

                return request.CreateResponse <MacrovariableEstimate>(HttpStatusCode.OK, macrovariableEstimate);
            }));
        }