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