RelationalDatabaseCreator.EnsureCreated Method
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.
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.
public virtual bool EnsureCreated ();
abstract member EnsureCreated : unit -> bool
override this.EnsureCreated : unit -> bool
Public Overridable Function EnsureCreated () As Boolean
Returns
true
if the database is created, false
if it already existed.
Implements
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework