IRelationalDatabaseCreator IRelationalDatabaseCreator Interface

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.

Syntax

Declaration

public interface IRelationalDatabaseCreator : IDatabaseCreatorPublic Interface IRelationalDatabaseCreator
    Inherits IDatabaseCreator

Inherited Members

EnsureDeleted(),
EnsureDeleted(),
EnsureDeletedAsync(CancellationToken),
EnsureDeletedAsync(CancellationToken),
EnsureCreated(),
EnsureCreated(),
EnsureCreatedAsync(CancellationToken)
EnsureCreatedAsync(CancellationToken)

Methods summary

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

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

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.

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.

Deletes the physical database.

Asynchronously deletes the physical database.

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

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

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.

  • 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<TResult><System.Boolean>
      System.Threading.Tasks.Task<TResult>(Of System.Boolean)

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

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll