我正在寫一個這樣的查詢:使用內部集合查詢另一個子查詢
var TheQuery = (from t in MyDC.Table1
where ....
select new SomeContainerModel()
{
Collection1 = (from t2 in MyDC.Table2
....
select new SomeModel()
{
SomeID = t2.SomeID
}
Collection2 = (from x in Collection1
from t3 in MyDC.Table3
where x.SomeID == t3.SomeOtherID
我想要做的,是使用Collection1
結果作爲Collection2
輸入。
這可能嗎?
好的,謝謝你的回答! – frenchie