Table of Contents

Method RenameCollection

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

RenameCollection(string, string, RenameCollectionOptions, CancellationToken)

Renames the collection.

void RenameCollection(string oldName, string newName, RenameCollectionOptions options = null, CancellationToken cancellationToken = default)

Parameters

oldName string

The old name.

newName string

The new name.

options RenameCollectionOptions

The options.

cancellationToken CancellationToken

The cancellation token.

RenameCollection(IClientSessionHandle, string, string, RenameCollectionOptions, CancellationToken)

Renames the collection.

void RenameCollection(IClientSessionHandle session, string oldName, string newName, RenameCollectionOptions options = null, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

oldName string

The old name.

newName string

The new name.

options RenameCollectionOptions

The options.

cancellationToken CancellationToken

The cancellation token.