Method DropDatabase

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

DropDatabase(string, CancellationToken)

Drops the database with the specified name.

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.

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.