linq join on 后多个条件怎么写

2025-04-30 04:44:35
推荐回答(1个)
回答1:

方法1:
on new{o.id,0.code} equals new {p.id,p.code}
方法2:
var tmp=from m in table1 from n in table2 where m.id==n.id && m.code==n.code select new{...};
方法3:
你把后面的条件放在where语句里面去.