File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,14 @@ public static IAggregateFluent<TDocument> Aggregate<TDocument>(this IMongoCollec
47
47
/// </summary>
48
48
/// <typeparam name="TDocument">The type of the document.</typeparam>
49
49
/// <param name="collection">The collection.</param>
50
+ /// <param name="aggregateOptions">The aggregate options</param>
50
51
/// <returns>A queryable source of documents.</returns>
51
- public static IMongoQueryable < TDocument > AsQueryable < TDocument > ( this IMongoCollection < TDocument > collection )
52
+ public static IMongoQueryable < TDocument > AsQueryable < TDocument > ( this IMongoCollection < TDocument > collection , AggregateOptions aggregateOptions = null )
52
53
{
53
- var provider = new MongoQueryProviderImpl < TDocument > ( collection , new AggregateOptions ( ) ) ;
54
+ Ensure . IsNotNull ( collection , nameof ( collection ) ) ;
55
+
56
+ aggregateOptions = aggregateOptions ?? new AggregateOptions ( ) ;
57
+ var provider = new MongoQueryProviderImpl < TDocument > ( collection , aggregateOptions ) ;
54
58
return new MongoQueryableImpl < TDocument , TDocument > ( provider ) ;
55
59
}
56
60
You can’t perform that action at this time.
0 commit comments