Method ExecuteAsync

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver.Linq

Assembly

MongoDB.Driver.dll

ExecuteAsync(Expression, CancellationToken)

Executes the strongly-typed query represented by a specified expression tree.

Task<TResult> ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken = default)

Parameters

expression Expression

An expression tree that represents a LINQ query.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

The value that results from executing the specified query.

Type Parameters

TResult

The type of the result.