Does LINQ to SQL support the t-sql "in" statement
c#, linq, linq-to-sql, t-sql
Solution
Yes, you use `Contains`:
db.Products.Where(product => myFields.Contains(product.Category))
aka
from product in db.Products
where myFields.Contains(product.Category)
select product
Problem
I dont't know how to describe the title better (so feel free to change) but essntial I want to produce the equivilent of the following statement in LINQ to SQL: ``` select * from products where category in ('shoes','boots') ``` The fields will be coming from the query string essentially (more secure than this but for ease of explanation) i.e ``` string[] myfields = request.querystring["categories"].split(','); ``` Thanks