Where and boolean expressions ?

Jul 25, 2013 at 5:06 AM
Edited Jul 25, 2013 at 7:34 AM

we intended to use your great(Many Thanks) project as DAL Independently.
so in order to insert a condition in Select\Update\Delete Query i have to parse my "Expression Tree Class(my own class)" to DBClause object, the parser worked successfully

unfortunately when passing the parsed object(which is DBClause) to Where method in a Query(Select\Update\Delete) it worked only if the resault is DBComparison but if it's DBBooleanOp there is know way to pass it in Where method, but we know that the Where expression at the end is Boolean, so how can i do that without using AndWhere\OrWhere Methods (i dont want to Repeat parser for Select\Update\Delete Query Also i don't wnat to use dynamic which point to(Select or Update or Delete Query) because none of the three query types Derived from class support Where)

Example of what i'm trying to do:
 public DBClause Parse(Filter filter)
        DBClause dc;
    //Parse filter to DBClause Object;
        return dc;

public void ExecuteQuery()
The only effortless solution is to add ( = true) like this
public void ExecuteQuery()
   var res = Parse(theFilter);
   if (res.GetType() != typeof(DBComparison)) { res = DBComparison.Compare(res,Compare.Equals,DBConst.Const(true));}
any suggestions ?
Jul 25, 2013 at 8:49 AM
Edited Jul 25, 2013 at 8:49 AM
huh my trick didn't work
I'm overloading the Where method know , wish me luck
Jul 25, 2013 at 8:56 AM
Edited Jul 25, 2013 at 10:35 AM
Sorry for bothering you, I solve it using DBComparison.Any & DBComparison.All :)