- 有个简单的按照字符串分组的方法,供参考
switch (queryCondition)
{
case "Day": //天
groups = from item in items
group item by item.PlanDate.Value.Date
into g
select new Dto()
{
Date = g.Key.ToString("yyyy-MM-dd"),
};