Class RuntimeKey
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents a primary or alternate key on an entity type.
public class RuntimeKey : AnnotatableBase, IRuntimeKey, IKey, IReadOnlyKey, IAnnotatable, IReadOnlyAnnotatable
- Inheritance
-
RuntimeKey
- Implements
- Inherited Members
- Extension Methods
Remarks
See Modeling entity types and relationships for more information and examples.
Constructors
RuntimeKey(IReadOnlyList<RuntimeProperty>)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
public RuntimeKey(IReadOnlyList<RuntimeProperty> properties)
Parameters
properties
IReadOnlyList<RuntimeProperty>
Properties
DebugView
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
public virtual DebugView DebugView { get; }
Property Value
DeclaringEntityType
Gets the entity type the key is defined on. This may be different from the type that Properties are defined on when the key is defined a derived type in an inheritance hierarchy (since the properties may be defined on a base type).
public virtual RuntimeEntityType DeclaringEntityType { get; }
Property Value
Properties
Gets the properties that make up the key.
public virtual IReadOnlyList<RuntimeProperty> Properties { get; }
Property Value
ReferencingForeignKeys
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
public virtual ISet<RuntimeForeignKey>? ReferencingForeignKeys { get; set; }
Property Value
Methods
SetIdentityMapFactory(Func<bool, IIdentityMap>)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
public virtual void SetIdentityMapFactory(Func<bool, IIdentityMap> factory)
Parameters
factory
Func<bool, IIdentityMap>
SetPrincipalKeyValueFactory<TKey>(IPrincipalKeyValueFactory<TKey>)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
public virtual void SetPrincipalKeyValueFactory<TKey>(IPrincipalKeyValueFactory<TKey> factory)
Parameters
factory
IPrincipalKeyValueFactory<TKey>
Type Parameters
TKey
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.