語言

ModelValidator.ValidateRedundantForeignKey Method

Definition

Validates that a foreign key is not redundant and logs a warning if it is.

protected virtual void ValidateRedundantForeignKey(Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
abstract member ValidateRedundantForeignKey : Microsoft.EntityFrameworkCore.Metadata.IForeignKey * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateRedundantForeignKey : Microsoft.EntityFrameworkCore.Metadata.IForeignKey * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Protected Overridable Sub ValidateRedundantForeignKey (foreignKey As IForeignKey, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))

Parameters

foreignKey
IForeignKey

The foreign key to validate.

Applies to