public List <TimesheetWithWorkItems> GetWorkItemsByTimesheetRestURL(string RestUrl, string siteUrl) { WorkItemsOperations objWorkItems = new WorkItemsOperations(); List <TimesheetWithWorkItems> timesheetWorkItems = new List <TimesheetWithWorkItems>(); timesheetWorkItems = CRUDOperations.GetListByRestURL <TimesheetWithWorkItems>(RestUrl); foreach (TimesheetWithWorkItems timesheetItem in timesheetWorkItems) { List <WorkItems> workItems = objWorkItems.GetWorkItemsByTimesheetID(Convert.ToString(timesheetItem.ID), siteUrl); timesheetItem.WorkItems = workItems; } return(timesheetWorkItems); }