日期:2014-05-20 浏览次数:21185 次
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 = [color=#FF0000]new DateTime[/color](p.PublishedDate.Year, p.PublishedDate.Month, 1)
group p by month into months
orderby months.Key descending
select [color=#FF0000]new KeyValuePair[/color]<ArchiveData, int>(new ArchiveData(months.Key.Year + "/" + months.Key.Month), months.Count());