📅  最后修改于: 2022-03-11 14:48:43.155000             🧑  作者: Mango
var v = from p in db.tableName
select new
{
ParentID = p.SerialNo,
child = from c in db.tableName
where c.Parent == p.SerialNo select
new
{
ChildID = c.SerialNo,
ParentID = c.Parent
}
};