The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
IDatabaseInitializer(Of TContext) Interface
Entity Framework 6.0
An implementation of this interface is used to initialize the underlying database when an instance of a DbContext derived class is used for the first time. This initialization can conditionally create the database and/or seed it with data. The strategy used is set using the static InitializationStrategy property of the Database class. The following implementations are provided: DropCreateDatabaseIfModelChanges(Of TContext), DropCreateDatabaseAlways(Of TContext), CreateDatabaseIfNotExists(Of TContext).
Assembly: EntityFramework (in EntityFramework.dll)
| Name | Description | |
|---|---|---|
![]() | InitializeDatabase(TContext) | Executes the strategy to initialize the database for the given context. |
Show:
.jpeg?cs-save-lang=1&cs-lang=vb)