0
我想的ObjectQuery爲選擇的ObjectQuery lambda表達式內選擇
SELECT *
FROM tableA
WHERE ID in (SELECT ID in tableB)
創建這樣使用lambda表達式查詢我嘗試使用
var histories = _entities.ProductViewHistories.Take(5).OrderByDescending(p=>p.DateViewed);
var products = _entities.Products.Where(p => p.ID in histories);
,但它不工作。 有人能指引我走向正確的方向嗎?
謝謝