private List <Statistic> InsertNewStatistics(Dictionary <KeyValuePair <DateTime, int>, int> pageViews) { var addedStatistics = new List <Statistic>(pageViews.Count); foreach (var pageView in pageViews) { var s = new Statistic { TimeSlot = pageView.Key.Key, PageID = pageView.Key.Value, Views = pageView.Value }; addedStatistics.Add(s); } statistics.SaveOrUpdate(addedStatistics); statistics.Flush(); return(addedStatistics); }
private void ClearBuckets(Bucket[] collectedBuckets) { buckets.Delete(collectedBuckets); buckets.Flush(); }