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

                MacroEconomicHistorical macroEconomicHistorical = _IFRS9Service.GetMacroEconomicHistorical(macroEconomicHistoricalId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                MacroEconomicHistorical macroEconomicHistorical = _IFRS9Service.GetMacroEconomicHistorical(macroEconomicHistoricalId);

                if (macroEconomicHistorical != null)
                {
                    _IFRS9Service.DeleteMacroEconomicHistorical(macroEconomicHistoricalId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateMacroEconomicHistorical(HttpRequestMessage request, [FromBody] MacroEconomicHistorical macroEconomicHistoricalModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var macroEconomicHistorical = _IFRS9Service.UpdateMacroEconomicHistorical(macroEconomicHistoricalModel);

                return request.CreateResponse <MacroEconomicHistorical>(HttpStatusCode.OK, macroEconomicHistorical);
            }));
        }