Table of Contents

Method StartSessionAsync

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

StartSessionAsync(ClientSessionOptions, CancellationToken)

Starts a client session.

public override sealed Task<IClientSessionHandle> StartSessionAsync(ClientSessionOptions options = null, CancellationToken cancellationToken = default)

Parameters

options ClientSessionOptions

The session options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IClientSessionHandle>

A Task whose result is a client session.