Table of Contents

Method StartSessionAsync

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

StartSessionAsync(CancellationToken)

Start a new client session asynchronously.

public Task<IClientSessionHandle> StartSessionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken that can be used to cancel this asynchronous request.

Returns

Task<IClientSessionHandle>

A Task that, when resolved, will contain the new MongoDB.Driver.IClientSessionHandle.