How to achieve Left Excluding JOIN using LINQ?

后端 未结 3 781
南方客
南方客 2021-01-17 08:04

How to achieve Left Excluding JOIN using LINQ?

In SQL:

SELECT  
FROM Table_A A
LEFT JOIN Table_B B
ON A.Key = B.Key
WHERE B.Key I         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-17 08:32

    An even faster way

    var result = from a in Table_A
        where !Table_B.Select(b => b.Key).Contains(a.Key)
        select new { ... };
    

提交回复
热议问题