两个表Table1、Table2 并表查下时,如果连接字段存在空值,直接用join 查不出数据,需用左连接
var list = from v in Table1
join x in Table2 on v.Id equals x.Table1Id into newlist
from d in newlist.DefaultIfEmpty()
两个表Table1、Table2 并表查下时,如果连接字段存在空值,直接用join 查不出数据,需用左连接
var list = from v in Table1
join x in Table2 on v.Id equals x.Table1Id into newlist
from d in newlist.DefaultIfEmpty()