IDatabaseCreatorWithCanConnect Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extends IDatabaseCreator to add CanConnect() methods. This interface will be merged with IDatabaseCreator in EF Core 3.0.
This interface is typically used by database providers (and other extensions). It is generally not used in application code.
public interface IDatabaseCreatorWithCanConnect : Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator
type IDatabaseCreatorWithCanConnect = interface
interface IDatabaseCreator
Public Interface IDatabaseCreatorWithCanConnect
Implements IDatabaseCreator
- Derived
- Implements
Methods
CanConnect() |
Determines whether or not the database is available and can be connected to. Note that being able to connect to the database does not mean that it is up-to-date with regard to schema creation, etc. |
CanConnectAsync(CancellationToken) |
Determines whether or not the database is available and can be connected to. Note that being able to connect to the database does not mean that it is up-to-date with regard to schema creation, etc. |
EnsureCreated() |
Ensures that the database for the context exists. If it exists, no action is taken. If it does not exist then the database and all its schema are created. If the database exists, then no effort is made to ensure it is compatible with the model for this context. (Inherited from IDatabaseCreator) |
EnsureCreatedAsync(CancellationToken) |
Asynchronously ensures that the database for the context exists. If it exists, no action is taken. If it does not exist then the database and all its schema are created. If the database exists, then no effort is made to ensure it is compatible with the model for this context. (Inherited from IDatabaseCreator) |
EnsureDeleted() |
Ensures that the database for the context does not exist. If it does not exist, no action is taken. If it does exist then the database is deleted. Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by the model for this context. (Inherited from IDatabaseCreator) |
EnsureDeletedAsync(CancellationToken) |
Asynchronously ensures that the database for the context does not exist. If it does not exist, no action is taken. If it does exist then the database is deleted. Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by the model for this context. (Inherited from IDatabaseCreator) |
Applies to
Entity Framework