Table of Contents

Method DropCollection

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

DropCollection(string, CancellationToken)

Drops the collection with the specified name.

void DropCollection(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name of the collection to drop.

cancellationToken CancellationToken

The cancellation token.

DropCollection(string, DropCollectionOptions, CancellationToken)

Drops the collection with the specified name.

void DropCollection(string name, DropCollectionOptions options, CancellationToken cancellationToken = default)

Parameters

name string

The name of the collection to drop.

options DropCollectionOptions

The options.

cancellationToken CancellationToken

The cancellation token.

DropCollection(IClientSessionHandle, string, CancellationToken)

Drops the collection with the specified name.

void DropCollection(IClientSessionHandle session, string name, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

name string

The name of the collection to drop.

cancellationToken CancellationToken

The cancellation token.

DropCollection(IClientSessionHandle, string, DropCollectionOptions, CancellationToken)

Drops the collection with the specified name.

void DropCollection(IClientSessionHandle session, string name, DropCollectionOptions options, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

name string

The name of the collection to drop.

options DropCollectionOptions

The options.

cancellationToken CancellationToken

The cancellation token.