can we dynamically appened where condition on a linq query?
for example:
class Result
{
string v1;
string v2;
string v3;
}
List<Result> result = (from r in results select r);
//i want to do something like the following....
if(conditionA)
{
result = result appened (or v1 = xxx)
}
else if(conditionB)
{
result = result appened (or v2 = xxx)
}
else if(conditionC)
{
result = result appened (or v3 == xxx)
}
Anyone know how handle the condition in Linq????
Th