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

                IncomeOtherBreakdown iob = _MPRCoreService.GetIncomeOtherBreakdown(iobID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                IncomeOtherBreakdown iob = _MPRCoreService.GetIncomeOtherBreakdown(iobId);

                if (iob != null)
                {
                    _MPRCoreService.DeleteIncomeOtherBreakdown(iobId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateIncomeOtherBreakdown(HttpRequestMessage request, [FromBody] IncomeOtherBreakdown iobModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var iob = _MPRCoreService.UpdateIncomeOtherBreakdown(iobModel);

                return request.CreateResponse <IncomeOtherBreakdown>(HttpStatusCode.OK, iob);
            }));
        }