ObjectStateManager.TryGetObjectStateEntry Method
Attempts to retrieve the corresponding ObjectStateEntry for the given System.Data.Entity.Core.EntityKey.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | TryGetObjectStateEntry(EntityKey, ObjectStateEntry) | Tries to retrieve the corresponding ObjectStateEntry for the object or relationship with the specified EntityKey . |
![]() | TryGetObjectStateEntry(Object, ObjectStateEntry) | Tries to retrieve the corresponding ObjectStateEntry for the specified Object . |
ObjectStateManager.TryGetObjectStateEntry Method (EntityKey, ObjectStateEntry)
Tries to retrieve the corresponding ObjectStateEntry for the object or relationship with the specified EntityKey .
Parameters
- key
-
Type:
System.Data.Entity.Core.EntityKey
The given EntityKey.
- entry
-
Type:
System.Data.Entity.Core.Objects.ObjectStateEntry
When this method returns, contains an ObjectStateEntry for the given EntityKey This parameter is passed uninitialized.
Return Value
Type: System.BooleanA Boolean value that is true if there is a corresponding ObjectStateEntry for the given EntityKey ; otherwise, false.
Exception | Condition |
---|---|
ArgumentNullException | A null (Nothing in Visual Basic) value is provided for key . |
ObjectStateManager.TryGetObjectStateEntry Method (Object, ObjectStateEntry)
Tries to retrieve the corresponding ObjectStateEntry for the specified Object .
Parameters
- entity
-
Type:
System.Object
The Object to which the retrieved ObjectStateEntry belongs.
- entry
-
Type:
System.Data.Entity.Core.Objects.ObjectStateEntry
When this method returns, contains the ObjectStateEntry for the given EntityKey This parameter is passed uninitialized.
Return Value
Type: System.BooleanA Boolean value that is true if there is a corresponding ObjectStateEntry for the given object; otherwise, false.