public HttpResponseMessage GetCustomerTransferPrice(HttpRequestMessage request, int customertransferpriceId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; CustomerTransferPrice CustomerTransferPrice = _MPRBSService.GetCustomerTransferPrice(customertransferpriceId); // notice no need to create a seperate model object since CustomerTransferPrice entity will do just fine response = request.CreateResponse <CustomerTransferPrice>(HttpStatusCode.OK, CustomerTransferPrice); return response; })); }
public HttpResponseMessage DeleteCustomerTransferPrice(HttpRequestMessage request, [FromBody] int customertransferpriceId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data CustomerTransferPrice CustomerTransferPrice = _MPRBSService.GetCustomerTransferPrice(customertransferpriceId); if (CustomerTransferPrice != null) { _MPRBSService.DeleteCustomerTransferPrice(customertransferpriceId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Acquirere mapping found under that ID."); } return response; })); }
public HttpResponseMessage UpdateCustomerTransferPrice(HttpRequestMessage request, [FromBody] CustomerTransferPrice CustomerTransferPriceModel) { return(GetHttpResponse(request, () => { var CustomerTransferPrice = _MPRBSService.UpdateCustomerTransferPrice(CustomerTransferPriceModel); return request.CreateResponse <CustomerTransferPrice>(HttpStatusCode.OK, CustomerTransferPrice); })); }
public CustomerTransferPrice UpdateCustomerTransferPrice(CustomerTransferPrice CustomerTransferPrice) { return(Channel.UpdateCustomerTransferPrice(CustomerTransferPrice)); }