public override IList <DailyInfoSummaryData> GetViewDataForTimePeriod(int userId, DateTime now,
                                                                              int numberOfMonthsToDisplay)
        {
            IQueryable <DailyInfoSummaryData> infos =
                MonthlyDailyInfoSummaryDataRepository.GetAsQueryable <DailyInfoSummaryData>();

            if (infos.Any())
            {
                DailyInfoSummaryData currentMonthEnergyInfo = infos.Last();

                IEnumerable <DailyInfoSummaryData> lastMonthsEnergyLevelInfo = FinalMonthlyDailyInfoSummaryDataRepository
                                                                               .GetAsQueryable <DailyInfoSummaryData>().ToList()
                                                                               .Where(
                    d => d.UserId == userId && DoGetInTimePeriodFilterComparision(now, numberOfMonthsToDisplay, d));

                //aggregate lists
                var allMontlyEnergyInfo = new List <DailyInfoSummaryData> {
                    currentMonthEnergyInfo
                };
                allMontlyEnergyInfo.AddRange(lastMonthsEnergyLevelInfo);
                InitializePeriodStrategy(userId);
                IList <TimeSpan>            monthlyTimeSpans        = PeriodSelectionStrategy.GetTimeSpans(now, numberOfMonthsToDisplay);
                List <DailyInfoSummaryData> energyLevelInfoViewData = FillRecordsOnEmptyTimeSpans(allMontlyEnergyInfo,
                                                                                                  monthlyTimeSpans);

                return(DailyInfoService.TranctuateDigits(energyLevelInfoViewData));
            }
            return(new List <DailyInfoSummaryData>());
        }
 public override IList <Model.DailyInfo.DailyInfo> GetViewDataForTimePeriod(int userId, DateTime now, int numberOfMonthsToDisplay)
 {
     return(DailyInfoService.TranctuateDigits(base.GetViewDataForTimePeriod(userId, now, numberOfMonthsToDisplay)));
 }