public IEnumerable <ReportItem <TValue> > GenerateByPersianMonth <TValue>(System.DateTime?from = null, System.DateTime?to = null) { System.DateTime f = from ?? _MIN, t = to ?? _MAX; while (f < t) { var pf = f.ToPersianDate(); yield return(new ReportItem <TValue> { Key = pf.Year * 100 + pf.Month, Month = pf.Month, MonthName = DateUtility.GetPersianMonthName(pf.Month), Year = pf.Year, }); f = pf.AddMonths(1).ToDateTime(); } }