我該如何將此SQL代碼轉換爲LINQ?我該如何將此SQL代碼轉換爲LINQ?
SELECT * FROM tbl1
WHERE NOT EXISTS (SELECT NULL AS Expr1
FROM tbl2 AS tbl2_1
WHERE (T = 'literal') AND tbl1.Id = someId)
這是我有什麼,但它不工作:
from a in Tbl1
let b = from b in Tbl2 select b.someId
let c = from c in Tbl2 select c.T
where (!c.Contains("literal") & !(b.Contains(a.Id)))
select a
請展開「不起作用」。 – Blorgbeard