ModelValidator.Validate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Validate(IModel) |
验证模型,如果发现任何错误,则会引发异常。 |
Validate(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>) |
验证模型,如果发现任何错误,则会引发异常。 |
Validate(IModel)
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
验证模型,如果发现任何错误,则会引发异常。
public virtual void Validate (Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member Validate : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
override this.Validate : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
Public Overridable Sub Validate (model As IModel)
参数
- model
- IModel
要验证的模型。
实现
适用于
Validate(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
验证模型,如果发现任何错误,则会引发异常。
public virtual 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
override this.Validate : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Public Overridable Sub Validate (model As IModel, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))
参数
- model
- IModel
要验证的模型。
要使用的记录器。