RelationalDatabaseCreator.HasTablesAsync(CancellationToken) Method

Definition

Asynchronously determines whether the database contains any tables. No attempt is made to determine if tables belong to the current model or not.

protected virtual System.Threading.Tasks.Task<bool> HasTablesAsync (System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<bool> HasTablesAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member HasTablesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.HasTablesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Protected Overridable Function HasTablesAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Public Overridable Function HasTablesAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains a value indicating whether any tables are present in the database.

Implements

Exceptions

Applies to