public HttpResponseMessage GetSetup(HttpRequestMessage request, int obeId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; OffBalanceSheetExposure offbalancesheetexposure = _IFRSDataService.GetOffBalanceSheetExposure(obeId); // notice no need to create a seperate model object since Setup entity will do just fine response = request.CreateResponse <OffBalanceSheetExposure>(HttpStatusCode.OK, offbalancesheetexposure); return response; })); }
public HttpResponseMessage Deleteoffbalancesheetexposure(HttpRequestMessage request, [FromBody] int obeId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data OffBalanceSheetExposure offbalancesheetexposure = _IFRSDataService.GetOffBalanceSheetExposure(obeId); if (offbalancesheetexposure != null) { _IFRSDataService.DeleteOffBalanceSheetExposure(obeId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Of BalancesheetExposure found under that ID."); } return response; })); }
public HttpResponseMessage Updateoffbalancesheetexposure(HttpRequestMessage request, [FromBody] OffBalanceSheetExposure offbalancesheetexposureModel) { return(GetHttpResponse(request, () => { var offbalancesheetexposure = _IFRSDataService.UpdateOffBalanceSheetExposure(offbalancesheetexposureModel); return request.CreateResponse <OffBalanceSheetExposure>(HttpStatusCode.OK, offbalancesheetexposure); })); }
public OffBalanceSheetExposure UpdateOffBalanceSheetExposure(OffBalanceSheetExposure offBalanceSheetExposure) { return(Channel.UpdateOffBalanceSheetExposure(offBalanceSheetExposure)); }