RuntimeEntityType.FindKey(IReadOnlyList<IReadOnlyProperty>) Method

Definition

Gets the primary or alternate key that is defined on the given properties. Returns null if no key is defined for the given properties.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeKey? FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
override this.FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
Public Overridable Function FindKey (properties As IReadOnlyList(Of IReadOnlyProperty)) As RuntimeKey

Parameters

properties
IReadOnlyList<IReadOnlyProperty>

The properties that make up the key.

Returns

The key, or null if none is defined.

Applies to