How to select record based on multiple values search in one column using linq query. like product id is "product1", "product2","product3" n number of values we have
相关问题
- Check if tie in count of lists using linq
- Trouble with OR in Sharepoint CAML
- get key value pairs from xml using linq
- query and create objects with a one to many relati
- select column from dataset using LINQ
相关文章
- 想问问Linq中有没有根据条件选择要不要关联表。
- Why do I need a ToList() to avoid disposed context
- DateDiff in LINQ
- LINQ .Include() properties from sub-types in TPH i
- “Between” in Linq C# [duplicate]
- Can a method chain be called LINQ?
- Get grouped comma separated values with linq
- How does a LINQ expression know that Where() comes
You could use something like (this is VB.Net, change to C# if necessary)
Alternatively, you could pull it all back to the client and use
.Contains
, like so:Going further still, you could create an extension method (generic, if that floats your boat) called IsIn or similar that allows you to swap the order of the collection and the search value:
You can use the .Contains method to check whether a value is within a list.