public HttpResponseMessage GetIncomeAccountsListing(HttpRequestMessage request, int Id) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; IncomeAccountsListing ial = _MPRBSService.GetIncomeAccountsListing(Id); // notice no need to create a seperate model object since AcquirerMapping entity will do just fine response = request.CreateResponse <IncomeAccountsListing>(HttpStatusCode.OK, ial); return response; })); }
public HttpResponseMessage DeleteIncomeAccountsListing(HttpRequestMessage request, [FromBody] int Id) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IncomeAccountsListing ial = _MPRBSService.GetIncomeAccountsListing(Id); if (ial != null) { _MPRBSService.DeleteIncomeAccountsListing(Id); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No record found under that ID."); } return response; })); }
public IncomeAccountsListing UpdateIncomeAccountsListing(IncomeAccountsListing ial) { return(Channel.UpdateIncomeAccountsListing(ial)); }
public HttpResponseMessage UpdateIncomeAccountsListing(HttpRequestMessage request, [FromBody] IncomeAccountsListing ialModel) { return(GetHttpResponse(request, () => { var ial = _MPRBSService.UpdateIncomeAccountsListing(ialModel); return request.CreateResponse <IncomeAccountsListing>(HttpStatusCode.OK, ial); })); }