Delen via


ForeignKeyComparer Class

Definition

An implementation of IComparer<T> and IEqualityComparer<T> to compare IReadOnlyForeignKey instances.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public sealed class ForeignKeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>
public sealed class ForeignKeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey>
type ForeignKeyComparer = class
    interface IEqualityComparer<IForeignKey>
    interface IComparer<IForeignKey>
type ForeignKeyComparer = class
    interface IEqualityComparer<IReadOnlyForeignKey>
    interface IComparer<IReadOnlyForeignKey>
Public NotInheritable Class ForeignKeyComparer
Implements IComparer(Of IForeignKey), IEqualityComparer(Of IForeignKey)
Public NotInheritable Class ForeignKeyComparer
Implements IComparer(Of IReadOnlyForeignKey), IEqualityComparer(Of IReadOnlyForeignKey)
Inheritance
ForeignKeyComparer
Implements

Remarks

See Implementation of database providers and extensions for more information and examples.

Fields

Instance

The singleton instance of the comparer to use.

Methods

Compare(IForeignKey, IForeignKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Compare(IReadOnlyForeignKey, IReadOnlyForeignKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Equals(IForeignKey, IForeignKey)

Determines whether the specified objects are equal.

Equals(IReadOnlyForeignKey, IReadOnlyForeignKey)

Determines whether the specified objects are equal.

GetHashCode(IForeignKey)

Returns a hash code for the specified object.

GetHashCode(IReadOnlyForeignKey)

Returns a hash code for the specified object.

Applies to