Table of Contents

Method DropCollectionAsync

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

DropCollectionAsync(string, CancellationToken)

Drops the collection with the specified name.

Task DropCollectionAsync(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name of the collection to drop.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.

DropCollectionAsync(string, DropCollectionOptions, CancellationToken)

Drops the collection with the specified name.

Task DropCollectionAsync(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.

Returns

Task

A task.

DropCollectionAsync(IClientSessionHandle, string, CancellationToken)

Drops the collection with the specified name.

Task DropCollectionAsync(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.

Returns

Task

A task.

DropCollectionAsync(IClientSessionHandle, string, DropCollectionOptions, CancellationToken)

Drops the collection with the specified name.

Task DropCollectionAsync(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.

Returns

Task

A task.