共用方式為


ModelValidator.ValidateDiscriminatorValues 方法

定義

多載

ValidateDiscriminatorValues(IEntityType)

驗證衍生自指定實體類型之所有實體類型的鑒別子和值。

ValidateDiscriminatorValues(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
已淘汰.

驗證模型中繼承的對應/組態。

ValidateDiscriminatorValues(IEntityType)

驗證衍生自指定實體類型之所有實體類型的鑒別子和值。

protected virtual void ValidateDiscriminatorValues (Microsoft.EntityFrameworkCore.Metadata.IEntityType rootEntityType);
abstract member ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> unit
override this.ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> unit
Protected Overridable Sub ValidateDiscriminatorValues (rootEntityType As IEntityType)

參數

rootEntityType
IEntityType

要驗證的實體類型。

適用於

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

警告

Use ValidateInheritanceMapping

驗證模型中繼承的對應/組態。

protected virtual void ValidateDiscriminatorValues (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
[System.Obsolete("Use ValidateInheritanceMapping")]
protected virtual void ValidateDiscriminatorValues (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
abstract member ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
[<System.Obsolete("Use ValidateInheritanceMapping")>]
abstract member ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateDiscriminatorValues : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Protected Overridable Sub ValidateDiscriminatorValues (model As IModel, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))

參數

model
IModel

要驗證的模型。

logger
IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

要使用的記錄器。

屬性

適用於