public HttpResponseMessage UpdateMPRGLMapping(HttpRequestMessage request, [FromBody] MPRGLMapping mprglMappingModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var mprglMapping = _MPRPLService.UpdateMPRGLMapping(mprglMappingModel);

                return request.CreateResponse <MPRGLMapping>(HttpStatusCode.OK, mprglMapping);
            }));
        }
        public HttpResponseMessage GetMPRGLMapping(HttpRequestMessage request, int mprglMappingId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                MPRGLMapping mprglMapping = _MPRPLService.GetMPRGLMapping(mprglMappingId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                MPRGLMapping mprglMapping = _MPRPLService.GetMPRGLMapping(mprglMappingId);

                if (mprglMapping != null)
                {
                    _MPRPLService.DeleteMPRGLMapping(mprglMappingId);

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

                return response;
            }));
        }
 public MPRGLMapping UpdateMPRGLMapping(MPRGLMapping mprGLMapping)
 {
     return(Channel.UpdateMPRGLMapping(mprGLMapping));
 }