Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你如何编写一个linq 查询来表达这一点:
Select * from Table where column IN (some values);
通过某些值,我的意思是('Value1', 'Value2', 'value3', ...)。
感谢您的帮助
假设
var some_values = new [] { "Value1", "Value2", "value3" };
然后:
data.Where(x => some_values.Contains(x))
或者:
from x in data where some_values.Contains(x) select x;