I'm new to Linq to Sql and am trying to do the following in C#.
I have a table that's a key/value store (that also has an fk to a user). I want to do a search off the key names and values as an or. On the front end, I allow them to add "filters" that are key names, then they can search for a value. So they can search N items, where N is the number of filters.
In plain sql, where N=3, it'd look like the following. datakey and datavalue are columns in the table (varchar(255)).
SELECT * from table
where (datakey='option1' and datavalue='value1')
or (datakey='option2' and datavalue='value2')
or (datakey='option3' and datavalue='value3')