Table of Contents

Method DropDatabase

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

DropDatabase(string, CancellationToken)

Drops the database with the specified name.

public void DropDatabase(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name of the database to drop.

cancellationToken CancellationToken

The cancellation token.

DropDatabase(IClientSessionHandle, string, CancellationToken)

Drops the database with the specified name.

public void DropDatabase(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.