Method RenameCollection
RenameCollection(string, string)
Renames a collection on this database.
public virtual CommandResult RenameCollection(string oldCollectionName, string newCollectionName)
Parameters
oldCollectionNamestringThe old name for the collection.
newCollectionNamestringThe new name for the collection.
Returns
- CommandResult
A CommandResult.
RenameCollection(string, string, bool)
Renames a collection on this database.
public virtual CommandResult RenameCollection(string oldCollectionName, string newCollectionName, bool dropTarget)
Parameters
oldCollectionNamestringThe old name for the collection.
newCollectionNamestringThe new name for the collection.
dropTargetboolWhether to drop the target collection first if it already exists.
Returns
- CommandResult
A CommandResult.