linq左连接使用equal两边为nullable和非nullable的情况
var query = from p in db.ParentTable join t in db.ChildTable on new {A = p.child_ID.GetValueOrDefault(0), B = p.OtherID} equals new {A = t.ID, B = t.OtherID} into j1 from c in j1.DefaultIfEmpty() select new { ... };

浙公网安备 33010602011771号