public HttpResponseMessage UpdateGLMap(HttpRequestMessage request, [FromBody] OpexGLMap glMapModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var glMap = _MPROPEXService.UpdateOpexGLMap(glMapModel);

                return request.CreateResponse <OpexGLMap>(HttpStatusCode.OK, glMap);
            }));
        }
        public HttpResponseMessage GetGLMap(HttpRequestMessage request, int glMapId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                OpexGLMap glMap = _MPROPEXService.GetOpexGLMap(glMapId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                OpexGLMap glMap = _MPROPEXService.GetOpexGLMap(glMapId);

                if (glMap != null)
                {
                    _MPROPEXService.DeleteOpexGLMapping(glMapId);

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

                return response;
            }));
        }
 public OpexGLMap UpdateOpexGLMap(OpexGLMap op)
 {
     return(Channel.UpdateOpexGLMap(op));
 }