IReadOnlyEntityType.FindKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FindKey(IReadOnlyProperty) |
Gets the primary or alternate key that is defined on the given property. Returns |
FindKey(IReadOnlyList<IReadOnlyProperty>) |
Gets the primary or alternate key that is defined on the given properties.
Returns |
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.IReadOnlyKey? FindKey (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);
abstract member FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
override this.FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
Public Overridable Function FindKey (property As IReadOnlyProperty) As IReadOnlyKey
Parameters
- property
- IReadOnlyProperty
The property that the key is defined on.
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.IReadOnlyKey? FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
Public Function FindKey (properties As IReadOnlyList(Of IReadOnlyProperty)) As IReadOnlyKey
Parameters
- properties
- IReadOnlyList<IReadOnlyProperty>
The properties that make up the key.
Returns
The key, or null
if none is defined.
Applies to
Entity Framework