Skip to content

Commit bed0524

Browse files
committed
CSHARP-3974: Remove WithOptions and WithSessions.
1 parent 69ae1ef commit bed0524

File tree

2 files changed

+0
-79
lines changed

2 files changed

+0
-79
lines changed

src/MongoDB.Driver/Linq/Linq3Implementation/IQueryableExtensions.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/MongoDB.Driver/Linq/Linq3Implementation/MongoQueryProvider.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)