MutableEntityTypeExtensions.FindKey(IMutableEntityType, IProperty) 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.
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 static Microsoft.EntityFrameworkCore.Metadata.IMutableKey FindKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member FindKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function FindKey (entityType As IMutableEntityType, property As IProperty) As IMutableKey
Parameters
- entityType
- IMutableEntityType
The entity type.
- property
- IProperty
The property that the key is defined on.
Returns
The key, or null if none is defined.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework