Click or drag to resize

MongoDatabaseBase.RenameCollection Method (IClientSessionHandle, String, String, RenameCollectionOptions, CancellationToken)

Renames the collection.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public virtual void RenameCollection(
	IClientSessionHandle session,
	string oldName,
	string newName,
	RenameCollectionOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

session
Type: MongoDB.Driver.IClientSessionHandle
The session.
oldName
Type: System.String
The old name.
newName
Type: System.String
The new name.
options (Optional)
Type: MongoDB.Driver.RenameCollectionOptions
The options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Implements

IMongoDatabase.RenameCollection(IClientSessionHandle, String, String, RenameCollectionOptions, CancellationToken)
See Also