8,497
社区成员
发帖
与我相关
我的任务
分享
return from p in context.oxite_Post
where p.oxite_Area.Any(a => a.oxite_Site.SiteID == siteID) && p.PublishedDate <= DateTime.UtcNow && p.State == (byte)EntityState.Normal
let month = new DateTime(p.PublishedDate.Year, p.PublishedDate.Month, 1)
group p by month into months
orderby months.Key descending
select new KeyValuePair<ArchiveData, int>(new ArchiveData(months.Key.Year + "/" + months.Key.Month), months.Count());