public HttpResponseMessage GetNEABranchSBUShares(HttpRequestMessage request, int nEABranchSBUSharesId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; NEABranchSBUShares nEABranchSBUShares = _MPROPEXService.GetNEABranchSBUShares(nEABranchSBUSharesId); // notice no need to create a seperate model object since NEABranchSBUShares entity will do just fine response = request.CreateResponse <NEABranchSBUShares>(HttpStatusCode.OK, nEABranchSBUShares); return response; })); }
public HttpResponseMessage DeleteNEABranchSBUShares(HttpRequestMessage request, [FromBody] int nEABranchSBUSharesId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data NEABranchSBUShares nEABranchSBUShares = _MPROPEXService.GetNEABranchSBUShares(nEABranchSBUSharesId); if (nEABranchSBUShares != null) { _MPROPEXService.DeleteNEABranchSBUShares(nEABranchSBUSharesId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Opex Business Rule found under that ID."); } return response; })); }
public NEABranchSBUShares UpdateNEABranchSBUShares(NEABranchSBUShares nEABranchSBUShares) { return(Channel.UpdateNEABranchSBUShares(nEABranchSBUShares)); }
public HttpResponseMessage UpdateNEABranchSBUShares(HttpRequestMessage request, [FromBody] NEABranchSBUShares nEABranchSBUSharesModel) { return(GetHttpResponse(request, () => { var nEABranchSBUShares = _MPROPEXService.UpdateNEABranchSBUShares(nEABranchSBUSharesModel); return request.CreateResponse <NEABranchSBUShares>(HttpStatusCode.OK, nEABranchSBUShares); })); }