Exemple #1
0
        public static string BuildExpression(Expression expression, INamingScheme namingScheme = null)
        {
            var visitor = new SDataExpressionBuilderVisitor(namingScheme ?? NamingScheme.Default);

            visitor.VisitExpression(expression);
            return(visitor._builder.ToString());
        }
        public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index)
        {
            var where = SDataExpressionBuilderVisitor.BuildExpression(whereClause.Predicate, _namingScheme);
            if (Where != null)
            {
                where = string.Format("({0} and {1})", Where, where);
            }

            Where = where;
            base.VisitWhereClause(whereClause, queryModel, index);
        }