Table of Contents

Method StartSession

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

StartSession(ClientSessionOptions, CancellationToken)

Starts a client session.

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

Parameters

options ClientSessionOptions

The session options.

cancellationToken CancellationToken

The cancellation token.

Returns

IClientSessionHandle

A client session.