Table of Contents

Method DatabaseExistsAsync

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

DatabaseExistsAsync(CancellationToken)

Determine if the database already exists or not asynchronously.

public Task<bool> DatabaseExistsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken that can be used to cancel this asynchronous request.

Returns

Task<bool>

A Task that, when resolved, will be true if the database exists, false if it does not.