IModelValidator.Validate 方法

定义

重载

Validate(IModel)

验证模型,如果发现任何错误,则会引发异常。

Validate(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)

验证模型,如果发现任何错误,则会引发异常。

Validate(IModel)

验证模型,如果发现任何错误,则会引发异常。

public void Validate (Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member Validate : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
Public Sub Validate (model As IModel)

参数

model
IModel

适用于

Validate(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)

验证模型,如果发现任何错误,则会引发异常。

public void Validate (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
abstract member Validate : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Public Sub Validate (model As IModel, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))

参数

model
IModel

要验证的模型。

logger
IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

要使用的记录器。

适用于