Class RelationalModelRuntimeInitializer
- Namespace
- Microsoft.EntityFrameworkCore.Infrastructure
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Initializes a Microsoft.EntityFrameworkCore.Metadata.IModel with the runtime dependencies.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class RelationalModelRuntimeInitializer : ModelRuntimeInitializer
- Inheritance
-
RelationalModelRuntimeInitializer
Remarks
The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.
See Implementation of database providers and extensions for more information and examples.
Constructors
RelationalModelRuntimeInitializer(ModelRuntimeInitializerDependencies, RelationalModelRuntimeInitializerDependencies)
Creates a new Microsoft.EntityFrameworkCore.Infrastructure.ModelRuntimeInitializer instance.
public RelationalModelRuntimeInitializer(ModelRuntimeInitializerDependencies dependencies, RelationalModelRuntimeInitializerDependencies relationalDependencies)
Parameters
dependencies
ModelRuntimeInitializerDependenciesThe dependencies to use.
relationalDependencies
RelationalModelRuntimeInitializerDependenciesThe relational dependencies to use.
Properties
RelationalDependencies
Relational provider-specific dependencies for this service.
protected virtual RelationalModelRuntimeInitializerDependencies RelationalDependencies { get; }
Property Value
Methods
InitializeModel(IModel, bool, bool)
Initializes the given model with runtime dependencies.
protected override void InitializeModel(IModel model, bool designTime, bool prevalidation)