EntityKey Class
Provides a durable reference to an object that is an instance of an entity type.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
| Name | Description | |
|---|---|---|
![]() | EntityKey() | Initializes a new instance of the EntityKey class. |
![]() | EntityKey(String^, IEnumerable<EntityKeyMember^>^) | Initializes a new instance of the EntityKey class with an entity set name and an IEnumerable<T> collection of EntityKeyMember objects. |
![]() | EntityKey(String^, IEnumerable<KeyValuePair<String^, Object^>>^) | Initializes a new instance of the EntityKey class with an entity set name and a generic T:System.Collections.Generic.KeyValuePair collection. |
![]() | EntityKey(String^, String^, Object^) | Initializes a new instance of the EntityKey class with an entity set name and specific entity key pair. |
| Name | Description | |
|---|---|---|
![]() | EntityContainerName | Gets or sets the name of the entity container. |
![]() | EntityKeyValues | Gets or sets the key values associated with this EntityKey. |
![]() | EntitySetName | Gets or sets the name of the entity set. |
![]() | IsTemporary | Gets a value that indicates whether the EntityKey is temporary. |
| Name | Description | |
|---|---|---|
![]() | Equals(EntityKey^) | Returns a value that indicates whether this instance is equal to a specified EntityKey. |
![]() | Equals(Object^) | Returns a value that indicates whether this instance is equal to a specified object. (Overrides Object::Equals(Object^).) |
![]() | GetEntitySet(MetadataWorkspace^) | Gets the entity set for this entity key from the given metadata workspace. |
![]() | GetHashCode() | Serves as a hash function for the current EntityKey object. GetHashCode is suitable for hashing algorithms and data structures such as a hash table.(Overrides Object::GetHashCode().) |
![]() | GetType() | |
![]() | OnDeserialized(StreamingContext) | Helper method that is used to deserialize an EntityKey. |
![]() | OnDeserializing(StreamingContext) | Helper method that is used to deserialize an EntityKey. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | EntityNotValidKey | A simple EntityKey identifying an entity that resulted from a failed TREAT operation. |
![]() ![]() | NoEntitySetKey | A singleton EntityKey by which a read-only entity is identified. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(EntityKey^, EntityKey^) | Compares two EntityKey objects. |
![]() ![]() | Inequality(EntityKey^, EntityKey^) | Compares two EntityKey objects. |
The EntityKey objects are immutable; that is, after they are constructed they cannot be modified.
For more information, see Working with Entity Keys.
Available since 3.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




