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

                EclCalculationModel eclcalculationmodel = _IFRS9Service.GetEclCalculationModel(eclcalculationmodelId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                EclCalculationModel eclcalculationmodel = _IFRS9Service.GetEclCalculationModel(eclcalculationmodelId);

                if (eclcalculationmodel != null)
                {
                    _IFRS9Service.DeleteEclCalculationModel(eclcalculationmodelId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateEclCalculationModel(HttpRequestMessage request, [FromBody] EclCalculationModel eclcalculationmodelModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var eclcalculationmodel = _IFRS9Service.UpdateEclCalculationModel(eclcalculationmodelModel);

                return request.CreateResponse <EclCalculationModel>(HttpStatusCode.OK, eclcalculationmodel);
            }));
        }