Beispiel #1
0
 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);
 }
 public QueryProvider(Database database, Expression <Func <T, bool> > whereExpression)
 {
     this._database        = database;
     this._pocoData        = database.PocoDataFactory.ForType(typeof(T));
     this._sqlExpression   = database.DatabaseType.ExpressionVisitor <T>(database, this._pocoData, true);
     this._buildComplexSql = new ComplexSqlBuilder <T>(database, this._pocoData, this._sqlExpression, this._joinSqlExpressions);
     this._sqlExpression   = this._sqlExpression.Where(whereExpression);
 }