public HttpResponseMessage GetBondPeriodicSchedule(HttpRequestMessage request, string refno) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; BondPeriodicSchedule[] bondperiodicschedule = _IFRSDataService.GetBondPeriodicSchedulebyRefNo(refno); // notice no need to create a seperate model object since BondPeriodicSchedule entity will do just fine response = request.CreateResponse <BondPeriodicSchedule[]>(HttpStatusCode.OK, bondperiodicschedule); return response; })); }