62,073
社区成员
发帖
与我相关
我的任务
分享
var list_serAll = from o in list_serviceAll
from l in list_ser_id
where l.id == o.id
select o;
这段代码是返回 list_serviceAll中课程id存在list_ser_id中的数据var list_serAll = from o in list_serviceAll
from l in list_ser_id
where l.id == o.id
select o;
var list=from s in list_student
from c in list_class
where c.id == s.classid
select s;
为什么你要写成那样?而不是这样?
var list=from s in list_student
where (from c in list_class select c.id).contains(s.class)
select s;
这儿有id吗?你改过来,50000条数据肯定可以在100毫秒以内算完,应该可能只有你第二条语句的1/3时间。