IRelationalDatabaseCreator IRelationalDatabaseCreator Interface

Definition

Performs database/schema creation, and other related operations.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IRelationalDatabaseCreator : IDatabaseCreator
Public Interface IRelationalDatabaseCreator
    Inherits IDatabaseCreator

Methods

Create() Create()

Creates the physical database. Does not attempt to populate it with any schema.

void Create()
Sub Create

CreateAsync(CancellationToken) CreateAsync(CancellationToken)

Asynchronously creates the physical database. Does not attempt to populate it with any schema.

Task CreateAsync(CancellationToken cancellationToken = null)
Function CreateAsync(cancellationToken As CancellationToken = Nothing) As Task
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

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

Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

A task that represents the asynchronous operation.

CreateTables() CreateTables()

Creates all tables for the current model in the database. No attempt is made to incrementally update the schema. It is assumed that none of the tables exist in the database.

void CreateTables()
Sub CreateTables

CreateTablesAsync(CancellationToken) CreateTablesAsync(CancellationToken)

Asynchronously creates all tables for the current model in the database. No attempt is made to incrementally update the schema. It is assumed that none of the tables exist in the database.

Task CreateTablesAsync(CancellationToken cancellationToken = null)
Function CreateTablesAsync(cancellationToken As CancellationToken = Nothing) As Task
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

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

Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

A task that represents the asynchronous operation.

Delete() Delete()

Deletes the physical database.

void Delete()
Sub Delete

DeleteAsync(CancellationToken) DeleteAsync(CancellationToken)

Asynchronously deletes the physical database.

Task DeleteAsync(CancellationToken cancellationToken = null)
Function DeleteAsync(cancellationToken As CancellationToken = Nothing) As Task
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

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

Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

A task that represents the asynchronous operation.

EnsureCreated() EnsureCreated()

Inherited from IDatabaseCreator

EnsureCreatedAsync(CancellationToken) EnsureCreatedAsync(CancellationToken)

Inherited from IDatabaseCreator

EnsureDeleted() EnsureDeleted()

Inherited from IDatabaseCreator

EnsureDeletedAsync(CancellationToken) EnsureDeletedAsync(CancellationToken)

Inherited from IDatabaseCreator

Exists() Exists()

Determines whether the physical database exists. No attempt is made to determine if the database contains the schema for the current model.

bool Exists()
Function Exists As Boolean
Returns
System.Boolean System.Boolean

True if the database exists; otherwise false.

ExistsAsync(CancellationToken) ExistsAsync(CancellationToken)

Asynchronously determines whether the physical database exists. No attempt is made to determine if the database contains the schema for the current model.

Task<bool> ExistsAsync(CancellationToken cancellationToken = null)
Function ExistsAsync(cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

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

Returns
System.Threading.Tasks.Task<System.Boolean> System.Threading.Tasks.Task(Of System.Boolean)

A task that represents the asynchronous operation. The task result contains true if the database exists; otherwise false.