NullDatabaseInitializer<TContext> Class
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.
An implementation of IDatabaseInitializer<TContext> that does nothing. Using this initializer disables database initialization for the given context type. Passing an instance of this class to SetInitializer<TContext>(IDatabaseInitializer<TContext>) is equivalent to passing null. When IDbDependencyResolver is being used to resolve initializers an instance of this class must be used to disable initialization.
public class NullDatabaseInitializer<TContext> : System.Data.Entity.IDatabaseInitializer<TContext> where TContext : DbContext
type NullDatabaseInitializer<'Context (requires 'Context :> DbContext)> = class
interface IDatabaseInitializer<'Context (requires 'Context :> DbContext)>
Public Class NullDatabaseInitializer(Of TContext)
Implements IDatabaseInitializer(Of TContext)
Type Parameters
- TContext
The type of the context.
- Inheritance
-
NullDatabaseInitializer<TContext>
- Implements
Constructors
NullDatabaseInitializer<TContext>() |
Methods
InitializeDatabase(TContext) |
Executes the strategy to initialize the database for the given context. |
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for