public HttpResponseMessage UpdateOpexGLBasis(HttpRequestMessage request, [FromBody] OpexGLBasis opexGLBasisModel) { return(GetHttpResponse(request, () => { var opexGLBasis = _MPROPEXService.UpdateOpexGLBasis(opexGLBasisModel); return request.CreateResponse <OpexGLBasis>(HttpStatusCode.OK, opexGLBasis); })); }
public HttpResponseMessage GetOpexGLBasis(HttpRequestMessage request, int opexGLBasisId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; OpexGLBasis opexGLBasis = _MPROPEXService.GetOpexGLBasis(opexGLBasisId); // notice no need to create a seperate model object since OpexGLBasis entity will do just fine response = request.CreateResponse <OpexGLBasis>(HttpStatusCode.OK, opexGLBasis); return response; })); }
public HttpResponseMessage DeleteOpexGLBasis(HttpRequestMessage request, [FromBody] int opexGLBasisId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data OpexGLBasis opexGLBasis = _MPROPEXService.GetOpexGLBasis(opexGLBasisId); if (opexGLBasis != null) { _MPROPEXService.DeleteOpexGLBasis(opexGLBasisId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No OpexGL Basis found under that ID."); } return response; })); }
public OpexGLBasis UpdateOpexGLBasis(OpexGLBasis opexGLBasis) { return(Channel.UpdateOpexGLBasis(opexGLBasis)); }