比如数据库有两张表及字段,studentInfo:ID 、Name、classID 和 ClassInfo:ClassID、ClassName
代码:
StudentEntities st = new StudentEntities();
var stu=
from s in st.StudentInfo
join c in st.ClassInfo
on s.ClassID equals c.ID
select new
{
Name=s.Name,
className=c.ClassName
};
如何将stu 转化为DataTable 或者List<T>??求大神支招啊