ModelRuntimeInitializer.Initialize 方法

定义

使用运行时依赖项验证和初始化给定模型。

public virtual 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
override this.Initialize : Microsoft.EntityFrameworkCore.Metadata.IModel * bool * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Overridable Function Initialize (model As IModel, Optional designTime As Boolean = true, Optional validationLogger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation) = Nothing) As IModel

参数

model
IModel

要初始化的模型。

designTime
Boolean

模型是否应包含设计时配置。

validationLogger
IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

验证记录器。

返回

初始化的模型。

实现

适用于