@@ -52,12 +52,6 @@ protected MongoQueryProvider(
52
52
public abstract object Execute ( Expression expression ) ;
53
53
public abstract TResult Execute < TResult > ( Expression expression ) ;
54
54
public abstract Task < TResult > ExecuteAsync < TResult > ( Expression expression , CancellationToken cancellationToken ) ;
55
- public MongoQueryProvider WithOptions ( AggregateOptions options ) => WithOptionsGeneric ( options ) ;
56
- public MongoQueryProvider WithSession ( IClientSessionHandle session ) => WithSessionGeneric ( session ) ;
57
-
58
- // protected methods
59
- protected abstract MongoQueryProvider WithOptionsGeneric ( AggregateOptions options ) ;
60
- protected abstract MongoQueryProvider WithSessionGeneric ( IClientSessionHandle session ) ;
61
55
}
62
56
63
57
internal sealed class MongoQueryProvider < TDocument > : MongoQueryProvider
@@ -112,26 +106,5 @@ public override Task<TResult> ExecuteAsync<TResult>(Expression expression, Cance
112
106
var executableQuery = ExpressionToExecutableQueryTranslator . TranslateScalar < TDocument , TResult > ( this , expression ) ;
113
107
return executableQuery . ExecuteAsync ( _session , cancellationToken ) ;
114
108
}
115
-
116
- public new MongoQueryProvider < TDocument > WithOptions ( AggregateOptions options )
117
- {
118
- return new MongoQueryProvider < TDocument > ( _collection , _session , options ) ;
119
- }
120
-
121
- public new MongoQueryProvider < TDocument > WithSession ( IClientSessionHandle session )
122
- {
123
- return new MongoQueryProvider < TDocument > ( _collection , session , _options ) ;
124
- }
125
-
126
- // protected methods
127
- protected override MongoQueryProvider WithOptionsGeneric ( AggregateOptions options )
128
- {
129
- return WithOptions ( options ) ;
130
- }
131
-
132
- protected override MongoQueryProvider WithSessionGeneric ( IClientSessionHandle session )
133
- {
134
- return WithSession ( session ) ;
135
- }
136
109
}
137
110
}
0 commit comments