Share via


IModelRuntimeInitializer.Initialize Method

Definition

Validates and initializes the given model with runtime dependencies.

public Microsoft.EntityFrameworkCore.Metadata.IModel Initialize (Microsoft.EntityFrameworkCore.Metadata.IModel model, bool designTime = true, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation>? validationLogger = default);
abstract member Initialize : Microsoft.EntityFrameworkCore.Metadata.IModel * bool * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function Initialize (model As IModel, Optional designTime As Boolean = true, Optional validationLogger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation) = Nothing) As IModel

Parameters

model
IModel

The model to initialize.

designTime
Boolean

Whether the model should contain design-time configuration.

validationLogger
IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

The validation logger. If null is provided validation will not be performed.

Returns

The initialized model.

Applies to