IEntityType.FindKey Method

Definition

Overloads

FindKey(IReadOnlyProperty)

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

FindKey(IReadOnlyList<IProperty>)

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

FindKey(IReadOnlyList<IReadOnlyProperty>)

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

FindKey(IReadOnlyProperty)

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

public virtual Microsoft.EntityFrameworkCore.Metadata.IKey? FindKey (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);
abstract member FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
override this.FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
Public Overridable Function FindKey (property As IReadOnlyProperty) As IKey

Parameters

property
IReadOnlyProperty

The property that the key is defined on.

Returns

The key, or null if none is defined.

Applies to

FindKey(IReadOnlyList<IProperty>)

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 Microsoft.EntityFrameworkCore.Metadata.IKey FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> -> Microsoft.EntityFrameworkCore.Metadata.IKey
Public Function FindKey (properties As IReadOnlyList(Of IProperty)) As IKey

Parameters

properties
IReadOnlyList<IProperty>

The properties that make up the key.

Returns

The key, or null if none is defined.

Applies to

FindKey(IReadOnlyList<IReadOnlyProperty>)

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 Microsoft.EntityFrameworkCore.Metadata.IKey? FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.IKey
Public Function FindKey (properties As IReadOnlyList(Of IReadOnlyProperty)) As IKey

Parameters

properties
IReadOnlyList<IReadOnlyProperty>

The properties that make up the key.

Returns

The key, or null if none is defined.

Applies to