Method FirstOrDefault
FirstOrDefault<TResult>(IAggregateFluent<TResult>, CancellationToken)
Returns the first document of the aggregate result, or the default value if the result set is empty.
public static TResult FirstOrDefault<TResult>(this IAggregateFluent<TResult> aggregate, CancellationToken cancellationToken = default)
Parameters
aggregate
IAggregateFluent<TResult>The aggregate.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- TResult
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.