Table of Contents

Method DropDatabaseAsync

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

DropDatabaseAsync(string, CancellationToken)

Drops the database with the specified name.

public override sealed Task DropDatabaseAsync(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name of the database to drop.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.

DropDatabaseAsync(IClientSessionHandle, string, CancellationToken)

Drops the database with the specified name.

public override sealed Task DropDatabaseAsync(IClientSessionHandle session, string name, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

name string

The name of the database to drop.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task.