public string Translate(DbExpression expression, out List <DbParam> parameters)
        {
            SqlGenerator generator = SqlGenerator.CreateInstance();

            expression = EvaluableDbExpressionTransformer.Transform(expression);
            expression.Accept(generator);

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

            return(sql);
        }
Ejemplo n.º 2
0
 public virtual SqlGenerator CreateSqlGenerator()
 {
     return(SqlGenerator.CreateInstance());
 }