public HttpResponseMessage UpdateGLMIS(HttpRequestMessage request, [FromBody] GLMIS glMISModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var glMIS = _MPRPLService.UpdateGLMIS(glMISModel);

                return request.CreateResponse <GLMIS>(HttpStatusCode.OK, glMIS);
            }));
        }
        public HttpResponseMessage GetGLMIS(HttpRequestMessage request, int glMISId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                GLMIS glMIS = _MPRPLService.GetGLMIS(glMISId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                GLMIS glMIS = _MPRPLService.GetGLMIS(glMISId);

                if (glMIS != null)
                {
                    _MPRPLService.DeleteGLMIS(glMISId);

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

                return response;
            }));
        }
 public GLMIS UpdateGLMIS(GLMIS glMIS)
 {
     return(Channel.UpdateGLMIS(glMIS));
 }