public HttpResponseMessage UpdateifrsBond(HttpRequestMessage request, [FromBody] IFRSBonds ifrsBondModel) { return(GetHttpResponse(request, () => { var ifrsBond = _IFRSDataService.UpdateIFRSBonds(ifrsBondModel); return request.CreateResponse <IFRSBonds>(HttpStatusCode.OK, ifrsBond); })); }
public HttpResponseMessage GetSetup(HttpRequestMessage request, int bondDataId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; IFRSBonds ifrsbond = _IFRSDataService.GetIFRSBonds(bondDataId); // notice no need to create a seperate model object since Setup entity will do just fine response = request.CreateResponse <IFRSBonds>(HttpStatusCode.OK, ifrsbond); return response; })); }
public HttpResponseMessage DeleteIFRSBond(HttpRequestMessage request, [FromBody] int bondId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IFRSBonds ifrsbond = _IFRSDataService.GetIFRSBonds(bondId); if (ifrsbond != null) { _IFRSDataService.DeleteIFRSBonds(bondId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Bonds found under that ID."); } return response; })); }
public IFRSBonds UpdateIFRSBonds(IFRSBonds IFRSBonds) { return(Channel.UpdateIFRSBonds(IFRSBonds)); }