@@ -52,12 +52,6 @@ protected MongoQueryProvider(
5252 public abstract object Execute ( Expression expression ) ;
5353 public abstract TResult Execute < TResult > ( Expression expression ) ;
5454 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 ) ;
6155 }
6256
6357 internal sealed class MongoQueryProvider < TDocument > : MongoQueryProvider
@@ -112,26 +106,5 @@ public override Task<TResult> ExecuteAsync<TResult>(Expression expression, Cance
112106 var executableQuery = ExpressionToExecutableQueryTranslator . TranslateScalar < TDocument , TResult > ( this , expression ) ;
113107 return executableQuery . ExecuteAsync ( _session , cancellationToken ) ;
114108 }
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- }
136109 }
137110}
0 commit comments