public HttpResponseMessage UpdateOpexGLBasis2(HttpRequestMessage request, [FromBody] OpexGLBasis2 opexModel) { return(GetHttpResponse(request, () => { var opex = _MPROPEXService.UpdateOpexGLBasis2(opexModel); return request.CreateResponse <OpexGLBasis2>(HttpStatusCode.OK, opex); })); }
public HttpResponseMessage GetOpexGLBasis2(HttpRequestMessage request, int ID) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; OpexGLBasis2 opex = _MPROPEXService.GetOpexGLBasis2(ID); // notice no need to create a seperate model object since ActivityBase entity will do just fine response = request.CreateResponse <OpexGLBasis2>(HttpStatusCode.OK, opex); return response; })); }
public HttpResponseMessage DeleteOpexGLBasis2(HttpRequestMessage request, [FromBody] int ID) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data OpexGLBasis2 opex = _MPROPEXService.GetOpexGLBasis2(ID); if (opex != null) { _MPROPEXService.DeleteActivityBase(ID); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Opex gl basis found under that ID."); } return response; })); }
public OpexGLBasis2 UpdateOpexGLBasis2(OpexGLBasis2 opexglbasis2) { return(Channel.UpdateOpexGLBasis2(opexglbasis2)); }