var ArticleList = new Services.Data.SearchService().GetArticleBaseList(ref param);
IEnumerable<IGrouping<string, Models.Data.ArticleBase>> Collection = ArticleList.GroupBy(p => p.YearIssue).ToList();//DBYL
foreach (IGrouping<string, Models.Data.ArticleBase> info in Collection)
{
List<Models.Data.ArticleBase> sl = info.ToList<Models.Data.ArticleBase>();//分组后的集合
}
关键是类型IEnumerable<IGrouping<string, Models.Data.ArticleBase>>的使用,然后是就是简单的遍历了