if (model.ConnectedToOtherProfilesId != 0)
{
var fooGroup = fans.GroupBy(x => x.FanId)
.Where(x => x.Any(z => z.ProfileId == model.ConnectedToOtherProfilesId));
var fooGroup2 = fooGroup.Where(grp => grp.Count() > 1);
}
我需要将fooGroup2
[IQueryable<IGrouping<int,PF>
]的结果放入IQueryiable<PF>
的粉丝中
类似这样的东西:
fans = fooGroup2;
答案 0 :(得分:1)
您可以使用SelectMany
。
//IQueryable<PF>
var fooGroup2 = fooGroup.Where(grp => grp.Count() > 1)
.SelectMany(pf => pf);