I know LINQ doesn’t have the SQL IN clause but rather uses “contains”. Can I use this on a LinqDataSource? I want to write a simple query that is equivelent to this:
SELECT * FROM tableA
WHERE tableA.requestType NOT IN (5,6,7,8) AND
tableA.someBitField IS NULL.
Is this possible using the LinqDataSource out of the box?
Thanks for any pointers.
Cheers,
~ck in San Diego
Yes, quite possible. Just handle the Selecting event on the datasource. The LinqDataSoruce class page on MSDN contains a great example already. Modifying that: