ObjectStateManager.GetObjectStateEntry Method
Retrieves the corresponding ObjectStateEntry for the given System.Data.Entity.Core.EntityKey.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | GetObjectStateEntry(EntityKey) | Returns an ObjectStateEntry for the object or relationship entry with the specified key. |
![]() | GetObjectStateEntry(Object) | Returns an ObjectStateEntry for the specified object. |
ObjectStateManager.GetObjectStateEntry Method (EntityKey)
Returns an ObjectStateEntry for the object or relationship entry with the specified key.
Parameters
- key
-
Type:
System.Data.Entity.Core.EntityKey
The EntityKey.
Return Value
Type: System.Data.Entity.Core.Objects.ObjectStateEntryThe corresponding ObjectStateEntry for the given EntityKey .
Exception | Condition |
---|---|
ArgumentNullException | When key is null. |
ArgumentException | When the specified key cannot be found in the state manager. |
InvalidOperationException | No entity with the specified EntityKey exists in the ObjectStateManager . |
ObjectStateManager.GetObjectStateEntry Method (Object)
Returns an ObjectStateEntry for the specified object.
Parameters
- entity
-
Type:
System.Object
The Object to which the retrieved ObjectStateEntry belongs.
Return Value
Type: System.Data.Entity.Core.Objects.ObjectStateEntryThe corresponding ObjectStateEntry for the given Object .
Exception | Condition |
---|---|
InvalidOperationException | No entity for the specified Object exists in the ObjectStateManager . |