Share via


KeyExtensions Class

Definition

Caution

Use IReadOnlyKey

Extension methods for IReadOnlyKey.

public static class KeyExtensions
[System.Obsolete("Use IReadOnlyKey")]
public static class KeyExtensions
type KeyExtensions = class
[<System.Obsolete("Use IReadOnlyKey")>]
type KeyExtensions = class
Public Module KeyExtensions
Public Class KeyExtensions
Inheritance
KeyExtensions
Attributes

Methods

GetKeyType(IKey)

Returns the type of the key property for simple keys, or an object array for composite keys.

GetPrincipalKeyValueFactory<TKey>(IKey)

Gets a factory for key values based on the index key values taken from various forms of entity data.

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

GetReferencingForeignKeys(IKey)

Gets all foreign keys that target a given primary or alternate key.

IsPrimaryKey(IKey)

Returns a value indicating whether the key is the primary key.

ToDebugString(IKey, MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

Applies to