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

                IncomePoolRateSbuYear incomePoolRateSbuYear = _MPRCoreService.GetIncomePoolRateSbuYear(ID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                IncomePoolRateSbuYear incomePoolRateSbuYear = _MPRCoreService.GetIncomePoolRateSbuYear(ID);

                if (incomePoolRateSbuYear != null)
                {
                    _MPRCoreService.DeleteIncomePoolRateSbuYear(ID);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateIncomePoolRateSbuYear(HttpRequestMessage request, [FromBody] IncomePoolRateSbuYear incomePoolRateSbuYearModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var incomePoolRateSbuYear = _MPRCoreService.UpdateIncomePoolRateSbuYear(incomePoolRateSbuYearModel);

                return request.CreateResponse <IncomePoolRateSbuYear>(HttpStatusCode.OK, incomePoolRateSbuYear);
            }));
        }