Method ToListAsync
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
ToListAsync(IQueryable, CancellationToken)
Executes the LINQ query and returns a list of the results.
public static Task<List<TSource>> ToListAsync<TSource>(this IQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
source
IQueryable
The sequence to return elements from.
cancellationToken
CancellationToken
The cancellation token.
Returns
A list of the results of executing the LINQ query.
Type Parameters
TSource
The type of the elements of source
.