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

                MprInterestMapping mprInterestMapping = _MPRCoreService.GetMprInterestMapping(ID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                MprInterestMapping mprInterestMapping = _MPRCoreService.GetMprInterestMapping(ID);

                if (mprInterestMapping != null)
                {
                    _MPRCoreService.DeleteMprInterestMapping(ID);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateMprInterestMapping(HttpRequestMessage request, [FromBody] MprInterestMapping mprInterestMappingModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var mprInterestMapping = _MPRCoreService.UpdateMprInterestMapping(mprInterestMappingModel);

                return request.CreateResponse <MprInterestMapping>(HttpStatusCode.OK, mprInterestMapping);
            }));
        }