0
例如我想從數據庫得到一樣的數據:如何使用linq的未鏈接結果?
using (ExplorerDataContext context = new ExplorerDataContext())
{
ObjectQuery<Store> stores = context.Store;
ObjectQuery<ProductPrice> productPrice = context.ProductPrice;
ObjectQuery<Product> products = context.Product;
res =
from store in stores
join pp in productPrice
on store equals pp.Store
join prod in products
on pp.Product equals prod
select store;
}
此代碼後的結果,因爲上下文不存在,我越不能轉移到一些其他方法。我怎樣才能得到獨立於上下文的未鏈接結果? 謝謝
哦,它的工作原理!非常感謝 – mimic 2010-04-06 00:42:53