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