public HttpResponseMessage UpdateGLMapping(HttpRequestMessage request, [FromBody] OpexGLMapping glMappingModel) { return(GetHttpResponse(request, () => { var glMapping = _MPROPEXService.UpdateOpexGLMapping(glMappingModel); return request.CreateResponse <OpexGLMapping>(HttpStatusCode.OK, glMapping); })); }
public HttpResponseMessage GetGLMapping(HttpRequestMessage request, int glMappingId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; OpexGLMapping glMapping = _MPROPEXService.GetOpexGLMapping(glMappingId); // notice no need to create a seperate model object since GLMapping entity will do just fine response = request.CreateResponse <OpexGLMapping>(HttpStatusCode.OK, glMapping); return response; })); }
public HttpResponseMessage DeleteGLMapping(HttpRequestMessage request, [FromBody] int glMappingId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data OpexGLMapping glMapping = _MPROPEXService.GetOpexGLMapping(glMappingId); if (glMapping != null) { _MPROPEXService.DeleteOpexGLMapping(glMappingId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No glMapping found under that ID."); } return response; })); }
public OpexGLMapping UpdateOpexGLMapping(OpexGLMapping opexGLMapping) { return(Channel.UpdateOpexGLMapping(opexGLMapping)); }