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

                IncomeSplitPoolsRate incomeSplitPoolsRate = _MPRCoreService.GetIncomeSplitPoolsRate(ID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                IncomeSplitPoolsRate incomeSplitPoolsRate = _MPRCoreService.GetIncomeSplitPoolsRate(ID);

                if (incomeSplitPoolsRate != null)
                {
                    _MPRCoreService.DeleteIncomeSplitPoolsRate(ID);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateIncomeSplitPoolsRate(HttpRequestMessage request, [FromBody] IncomeSplitPoolsRate incomeSplitPoolsRateModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var incomeSplitPoolsRate = _MPRCoreService.UpdateIncomeSplitPoolsRate(incomeSplitPoolsRateModel);

                return request.CreateResponse <IncomeSplitPoolsRate>(HttpStatusCode.OK, incomeSplitPoolsRate);
            }));
        }