ModelValidator.ValidateRedundantForeignKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
The logger to use.