2011-11-04 112 views
0

的LINQ到实体查询SQL什么的LINQ to实体查询下面的SQL语句什么是声明

Select * from table where id in (‘1’, ‘2’, ‘3’, …..So on Millions) 
+0

是否使用EFv1(.NET 3.5)或更高版本? –

回答

0

放( '1', '2', '3',... ..因此,对列表中的数以百万计)

然后下面是LINQ到实体查询 - >

from t in tables where list.contains(t.id) select t 
+0

我试过你的解决方案,但得到这个错误'base {System.SystemException} = {“LINQ to Entities does not recognized the method'Boolean Contains(Int64)'method,this method can not be translated into a store expression。”}' – user1029184

+0

您能否寄给我您为此编写的确切代码,以便我可以告诉您确切的解决方案? – himanshu