Table of Contents

Method ExecuteAsync

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

ExecuteAsync<TResult>(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<TResult>

The value that results from executing the specified query.

Type Parameters

TResult

The type of the result.