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

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

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

            return(sql);
        }
Esempio 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);
        }