@@ -486,7 +486,7 @@ public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TS
486
486
/// <returns>
487
487
/// The first element in <paramref name="source" />.
488
488
/// </returns>
489
- public static Task < TSource > FirstAsync < TSource > ( this IQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
489
+ public static Task < TSource > FirstAsync < TSource > ( this IMongoQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
490
490
{
491
491
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
492
492
Expression . Call (
@@ -505,7 +505,7 @@ public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TS
505
505
/// <returns>
506
506
/// The first element in <paramref name="source" /> that passes the test in <paramref name="predicate" />.
507
507
/// </returns>
508
- public static Task < TSource > FirstAsync < TSource > ( this IQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
508
+ public static Task < TSource > FirstAsync < TSource > ( this IMongoQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
509
509
{
510
510
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
511
511
Expression . Call (
@@ -524,7 +524,7 @@ public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TS
524
524
/// <returns>
525
525
/// default(<typeparamref name="TSource" />) if <paramref name="source" /> is empty; otherwise, the first element in <paramref name="source" />.
526
526
/// </returns>
527
- public static Task < TSource > FirstOrDefaultAsync < TSource > ( this IQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
527
+ public static Task < TSource > FirstOrDefaultAsync < TSource > ( this IMongoQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
528
528
{
529
529
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
530
530
Expression . Call (
@@ -543,7 +543,7 @@ public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TS
543
543
/// <returns>
544
544
/// default(<typeparamref name="TSource" />) if <paramref name="source" /> is empty or if no element passes the test specified by <paramref name="predicate" />; otherwise, the first element in <paramref name="source" /> that passes the test specified by <paramref name="predicate" />.
545
545
/// </returns>
546
- public static Task < TSource > FirstOrDefaultAsync < TSource > ( this IQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
546
+ public static Task < TSource > FirstOrDefaultAsync < TSource > ( this IMongoQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
547
547
{
548
548
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
549
549
Expression . Call (
@@ -837,7 +837,7 @@ public static IOrderedMongoQueryable<TSource> OrderByDescending<TSource, TKey>(t
837
837
/// <returns>
838
838
/// A sample of the elements in the <paramref name="source"/>.
839
839
/// </returns>
840
- public static IMongoQueryable < TSource > Sample < TSource > ( this IQueryable < TSource > source , long count )
840
+ public static IMongoQueryable < TSource > Sample < TSource > ( this IMongoQueryable < TSource > source , long count )
841
841
{
842
842
return ( IMongoQueryable < TSource > ) source . Provider . CreateQuery < TSource > (
843
843
Expression . Call (
@@ -907,7 +907,7 @@ public static IMongoQueryable<TResult> SelectMany<TSource, TCollection, TResult>
907
907
/// <returns>
908
908
/// The single element of the input sequence.
909
909
/// </returns>
910
- public static Task < TSource > SingleAsync < TSource > ( this IQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
910
+ public static Task < TSource > SingleAsync < TSource > ( this IMongoQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
911
911
{
912
912
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
913
913
Expression . Call (
@@ -926,7 +926,7 @@ public static IMongoQueryable<TResult> SelectMany<TSource, TCollection, TResult>
926
926
/// <returns>
927
927
/// The single element of the input sequence that satisfies the condition in <paramref name="predicate" />.
928
928
/// </returns>
929
- public static Task < TSource > SingleAsync < TSource > ( this IQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
929
+ public static Task < TSource > SingleAsync < TSource > ( this IMongoQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
930
930
{
931
931
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
932
932
Expression . Call (
@@ -945,7 +945,7 @@ public static IMongoQueryable<TResult> SelectMany<TSource, TCollection, TResult>
945
945
/// <returns>
946
946
/// The single element of the input sequence, or default(<typeparamref name="TSource" />) if the sequence contains no elements.
947
947
/// </returns>
948
- public static Task < TSource > SingleOrDefaultAsync < TSource > ( this IQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
948
+ public static Task < TSource > SingleOrDefaultAsync < TSource > ( this IMongoQueryable < TSource > source , CancellationToken cancellationToken = default ( CancellationToken ) )
949
949
{
950
950
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
951
951
Expression . Call (
@@ -964,7 +964,7 @@ public static IMongoQueryable<TResult> SelectMany<TSource, TCollection, TResult>
964
964
/// <returns>
965
965
/// The single element of the input sequence that satisfies the condition in <paramref name="predicate" />, or default(<typeparamref name="TSource" />) if no such element is found.
966
966
/// </returns>
967
- public static Task < TSource > SingleOrDefaultAsync < TSource > ( this IQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
967
+ public static Task < TSource > SingleOrDefaultAsync < TSource > ( this IMongoQueryable < TSource > source , Expression < Func < TSource , bool > > predicate , CancellationToken cancellationToken = default ( CancellationToken ) )
968
968
{
969
969
return ( ( IMongoQueryProvider ) source . Provider ) . ExecuteAsync < TSource > (
970
970
Expression . Call (
0 commit comments