How to do a "where in values" in LINQ-to-Entities
Posted
by Ty
on Stack Overflow
See other posts from Stack Overflow
or by Ty
Published on 2008-09-17T22:50:23Z
Indexed on
2010/03/30
7:03 UTC
Read the original article
Hit count: 590
LINQ
|linq-to-entities
Does anybody know how to apply a "where in values" type condition using LINQ-to-Entities? I've tried the following but it doesn't work:
var values = new[] { "String1", "String2" }; // some string values
var foo = model.entitySet.Where(e => values.Contains(e.Name));
I believe this works in LINQ-to-SQL though? Any thoughts?
© Stack Overflow or respective owner