ModelValidator.ValidateDiscriminatorValues 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
要驗證的模型。
要使用的記錄器。
- 屬性