Exemplo n.º 1
0
        public string Translate(DbExpression expression, out List <DbParam> parameters)
        {
            SqlGenerator_ConvertToLowercase generator = new SqlGenerator_ConvertToLowercase();

            expression = DbExpressionOptimizer.Optimize(expression);
            expression.Accept(generator);

            parameters = generator.Parameters;
            string sql = generator.SqlBuilder.ToSql();

            return(sql);
        }
Exemplo n.º 2
0
        public string Translate(DbExpression expression, out List <DbParam> parameters)
        {
            SqlGenerator generator = SqlGenerator.CreateInstance();

            expression = DbExpressionOptimizer.Optimize(expression);
            expression.Accept(generator);

            parameters = generator.Parameters;
            string sql = generator.SqlBuilder.ToSql();

            return(sql);
        }