예제 #1
0
        private WhereClause CreateWhereClause(SqlQuery query)
        {
            var commandParameterFactory = new CommandParameterFactory();

            var generator = new QueryExpressionTreeWhereClauseGenerator(commandParameterFactory);

            return(generator.CreateWhereClause(query.QueryExpressionTree));
        }
예제 #2
0
        public void Visit(QueryExpressionTreeOrBranch tree)
        {
            foreach (var node in tree.Nodes)
            {
                var whereClauseGenerator = new QueryExpressionTreeWhereClauseGenerator(_commandParameterFactory);
                var whereClause          = whereClauseGenerator.CreateWhereClause(node);

                _whereClause = _whereClause.Combine(whereClause, QueryCombinationOperation.Or);
            }
        }