ForeignKeyComparer 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
实例的 IComparer<T> 实现和 IEqualityComparer<T> 比较 IReadOnlyForeignKey 。
此类型通常由数据库提供程序(和其他扩展)使用。 它通常不用于应用程序代码。
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class ForeignKeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.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>
[<System.Runtime.CompilerServices.Nullable(0)>]
type ForeignKeyComparer = class
interface IEqualityComparer<IReadOnlyForeignKey>
interface IComparer<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 IReadOnlyForeignKey), IEqualityComparer(Of IReadOnlyForeignKey)
Public NotInheritable Class ForeignKeyComparer
Implements IComparer(Of IForeignKey), IEqualityComparer(Of IForeignKey)
- 继承
-
ForeignKeyComparer
- 特性
- 实现
注解
有关详细信息和示例,请参阅 数据库提供程序和扩展的实现 。
字段
| 名称 | 说明 |
|---|---|
| Instance |
要使用的比较器的单一实例。 |
方法
| 名称 | 说明 |
|---|---|
| Compare(IForeignKey, IForeignKey) |
比较两个对象并返回一个值,该值指示一个对象是小于、等于还是大于另一个对象。 |
| Compare(IReadOnlyForeignKey, IReadOnlyForeignKey) |
比较两个对象并返回一个值,该值指示一个对象是小于、等于还是大于另一个对象。 |
| Equals(IForeignKey, IForeignKey) |
确定指定的对象是否相等。 |
| Equals(IReadOnlyForeignKey, IReadOnlyForeignKey) |
确定指定的对象是否相等。 |
| GetHashCode(IForeignKey) |
返回指定对象的哈希代码。 |
| GetHashCode(IReadOnlyForeignKey) |
返回指定对象的哈希代码。 |