Entity framework 4 如何在实体框架中一次查询多个值?

Entity framework 4 如何在实体框架中一次查询多个值?,entity-framework-4,Entity Framework 4,我的请求: "http://hostname/sample/getrecord?appid=1&domain=physics,化学与平台=cs,ece“ 如何像SQLServer2008中的“in”语句一样在LINQtoSQL中查询。 如何将同一列的多个参数作为字符串发送到linq to sql中的SP。 请帮帮我吧……也许你想要这样的东西: string domain=“物理、化学”; string[]domains=domain.Split(','); var records=context

我的请求: "http://hostname/sample/getrecord?appid=1&domain=physics,化学与平台=cs,ece“

如何像SQLServer2008中的“in”语句一样在LINQtoSQL中查询。 如何将同一列的多个参数作为字符串发送到linq to sql中的SP。
请帮帮我吧……

也许你想要这样的东西:

string domain=“物理、化学”;
string[]domains=domain.Split(',');
var records=context.records.Where(r=>domains.Contains(r.Domain)).ToList();
(假设
是实体
记录
中的
字符串
属性)