/// <summary> /// Uses QueryTranslator to translate a LINQ Expression to a SQL query. /// </summary> /// <returns>The sql query.</returns> /// <param name="expression">The LINQ Expression to be translated.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> private SQLPredicate Translate(Expression expression, bool ignoreAliases = false) { ISQLTranslator sql = SQLTranslatorFactory.GetTranslator(DbType); SQLPredicate pred = sql.Translate(Evaluator.PartialEval(expression), 0, ignoreAliases); return(pred); }
/// <summary> /// Uses QueryTranslator to translate a LINQ Expression to a SQL query. /// </summary> /// <returns>The sql query.</returns> /// <param name="expression">The LINQ Expression to be translated.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> private SQLPredicate Translate(Expression expression) { ISQLTranslator sql = SQLTranslatorFactory.GetTranslator(DbType); SQLPredicate pred = sql.Translate(Evaluator.PartialEval(expression)); return(pred); }
public JoinProvider(DbProvider provider) { DbProvider = provider; QueryTranslator = SQLTranslatorFactory.GetTranslator(provider.DbType); }