sql转linq
select max(StuId) from StudentInfo group by StuName having count(StuName)>1
转Linq怎么写,谢谢哈 linq
[解决办法]
var list=StudentInfo.GroupBy(t=>t.StuName).Where(t=>t.Count()>1).Select(t=>t.Max(tt=>tt.StuId)).ToList();