我想在LINQ中創建下面的代碼。我使用Linqpad來測試我的代碼,但不斷收到錯誤:錯誤與.Any和.Contains for Linq查詢爲Oracle
"NotSupportedException: Constructing or initializing instances of the type <>f__AnonymousType0
2[LINQPad.User.RNIS_MAINTBOUNDARY_V,System.Linq.IQueryable
1[System.Int32]] with the expression http://localhost:14722/WCFDataservice.svc/RNIS_DRE_AREA_V is not supported."
我的代碼如下:
var roads =
from d in RNIS_MAINTBOUNDARY_V
let ts2 =
from dretab in RNIS_DRE_AREA_V
select dretab.DRE_CODE
where ts2.Contains(d.AUTH_ID)
select d;
roads.Dump();
作爲參考,2場的加入,即AUTH_ID和dre_code都Oracle編號字段。爲什麼我會得到這個錯誤?