public HttpResponseMessage GetGLReclassification(HttpRequestMessage request, int glReclassificationId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; GLReclassification glReclassification = _MPRPLService.GetGLReclassification(glReclassificationId); // notice no need to create a seperate model object since GLReclassification entity will do just fine response = request.CreateResponse <GLReclassification>(HttpStatusCode.OK, glReclassification); return response; })); }
public HttpResponseMessage DeleteGLReclassification(HttpRequestMessage request, [FromBody] int glReclassificationId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data GLReclassification glReclassification = _MPRPLService.GetGLReclassification(glReclassificationId); if (glReclassification != null) { _MPRPLService.DeleteGLReclassification(glReclassificationId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No glReclassification found under that ID."); } return response; })); }
public GLReclassification UpdateGLReclassification(GLReclassification glReclassification) { return(Channel.UpdateGLReclassification(glReclassification)); }
public HttpResponseMessage UpdateGLReclassification(HttpRequestMessage request, [FromBody] GLReclassification glReclassificationModel) { return(GetHttpResponse(request, () => { var glReclassification = _MPRPLService.UpdateGLReclassification(glReclassificationModel); return request.CreateResponse <GLReclassification>(HttpStatusCode.OK, glReclassification); })); }