語言

ForeignKeyComparer 類別

定義

和 IEqualityComparer<T> 的實作 IComparer<T> ,用來比較 IReadOnlyForeignKey 實例。

此類型通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

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)
繼承
ForeignKeyComparer
實作

備註

如需詳細資訊 和範例,請參閱資料庫提供者和延伸模組的實作 。

欄位

名稱 Description
Instance

要使用的比較子單一實例。

方法

名稱 Description
Compare(IForeignKey, IForeignKey)

比較兩個物件並傳回值,指出其中一個物件為小於、等於或大於另一個物件。

Compare(IReadOnlyForeignKey, IReadOnlyForeignKey)

比較兩個物件並傳回值,指出其中一個物件為小於、等於或大於另一個物件。

Equals(IForeignKey, IForeignKey)

判斷指定的物件是否相等。

Equals(IReadOnlyForeignKey, IReadOnlyForeignKey)

判斷指定的物件是否相等。

GetHashCode(IForeignKey)

傳回指定物件的雜湊碼。

GetHashCode(IReadOnlyForeignKey)

傳回指定物件的雜湊碼。

適用於