0
我在SQL中是正常看似簡單的查詢:轉換條件加盟SQL到LINQ
SELECT table1.Id, count(table2.col) AS OrderCol
FROM table1
LEFT JOIN table2 ON table1.Id = table2.Id
LEFT JOIN table3 ON table2.Id = table3.Id AND table2.condition = 3 //some integer value
GROUP BY table1.Id
ORDER BY count(table2.col) DESC
當AND
子句中加入出現,我不知道如何將其轉換爲LINQ ..
如何實現它?
需要在第糾正'{t2.Id,t2.condition}'...應該是'{t2sub .Id,t2sub.condition}' – Vikrant
@Vikrant,修正了 –
仍然'對象引用未設置爲對象的實例'錯誤來了 – Vikrant