Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 public JoinProvider(DbProvider provider)
 {
     DbProvider      = provider;
     QueryTranslator = SQLTranslatorFactory.GetTranslator(provider.DbType);
 }