private static void GetEventData(DateTime fromDate, DateTime toDate, Site site) { System.Console.WriteLine("GetEventData for site : " + site.siteId + ", GA account : " + site.account); AnalyticsRepository AnalyticsRepository = new AnalyticsRepositoryImpl(); GAService gaService = new GAService_Impl(); List<SiteEvent> events = gaService.getEventData(fromDate, toDate, site); foreach (SiteEvent siteEvent in events) { AnalyticsRepository.recordAnalyticsEvent(siteEvent); } }