Hi all,
I am having a few issues with trying to live in a subsonic world and being a subsonic girl when it comes to subsonic expressions....
after reading http://stackoverflow.com/questions/765896/subsonic-query-conditiona-or-conditionb-and-conditionc it would appear i am not the only one with this sort of issue but hopefully someone (the almighty rob??) can answer this.
i am attempting to create an expression in my query based on a looping condition. what i want to achieve (in pseudo code) is something like this:
objQuery.andexpressionstart();
foreach (condition in conditions){
if (condition){
objQuery.and(conditionColumn).isequalto(X);
}
}
objQuery.expressionstop();
my main issue is that each condition that is inside the expression is a different column - otherwise i could just use .In() . i also have extra search criteria (read a fair bit) outside so it can't be outside an expression.
i REALLY don't want to leave the warm coseyness of the strongly-typed-subsonic womb however i think in this instance i might have too... if i DO have to is there a way to add to a subsonic query with a hand typed condition so i don't have to change all the other code in the query (alot of business logic living in subsonic land right now)
As always, thanks for any help cheers