public HttpResponseMessage Getoffbalancesheetexposure(HttpRequestMessage request, string portfolio) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; OffBalanceSheetExposure[] offbalancesheetexposure = _IFRSDataService.GetOffBalanceSheetExposureByPortfolio(portfolio); // notice no need to create a seperate model object since TBillsComputationResult entity will do just fine response = request.CreateResponse <OffBalanceSheetExposure[]>(HttpStatusCode.OK, offbalancesheetexposure.ToArray()); return response; })); }