Table of Contents

Method StartSession

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

StartSession(ClientSessionOptions, CancellationToken)

Starts a client session.

public override sealed IClientSessionHandle StartSession(ClientSessionOptions options = null, CancellationToken cancellationToken = default)

Parameters

options ClientSessionOptions

The session options.

cancellationToken CancellationToken

The cancellation token.

Returns

IClientSessionHandle

A client session.