public QueryProvider(IDatabase database, Expression <Func <T, bool> > whereExpression)
 {
     _database        = database;
     _sqlExpression   = database.DatabaseType.ExpressionVisitor <T>(database, true);
     _buildComplexSql = new ComplexSqlBuilder <T>(database, _sqlExpression, _joinSqlExpressions);
     _sqlExpression   = _sqlExpression.Where(whereExpression);
 }
Exemple #2
0
 public QueryProvider(Database database, Expression <Func <T, bool> > whereExpression)
 {
     _database        = database;
     _pocoData        = database.PocoDataFactory.ForType(typeof(T));
     _sqlExpression   = database.DatabaseType.ExpressionVisitor <T>(database, _pocoData, true);
     _buildComplexSql = new ComplexSqlBuilder <T>(database, _pocoData, _sqlExpression, _joinSqlExpressions);
     _sqlExpression   = _sqlExpression.Where(whereExpression);
 }