ObjectStateManager.GetObjectStateEntry 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.
Overloads
GetObjectStateEntry(EntityKey) |
Returns an ObjectStateEntry for the object or relationship entry with the specified key. |
GetObjectStateEntry(Object) |
Returns an ObjectStateEntry for the specified object. |
GetObjectStateEntry(EntityKey)
Returns an ObjectStateEntry for the object or relationship entry with the specified key.
public virtual System.Data.Entity.Core.Objects.ObjectStateEntry GetObjectStateEntry (System.Data.Entity.Core.EntityKey key);
abstract member GetObjectStateEntry : System.Data.Entity.Core.EntityKey -> System.Data.Entity.Core.Objects.ObjectStateEntry
override this.GetObjectStateEntry : System.Data.Entity.Core.EntityKey -> System.Data.Entity.Core.Objects.ObjectStateEntry
Public Overridable Function GetObjectStateEntry (key As EntityKey) As ObjectStateEntry
Parameters
Returns
The corresponding ObjectStateEntry for the given EntityKey .
Exceptions
When key is null.
When the specified key cannot be found in the state manager.
No entity with the specified EntityKey exists in the ObjectStateManager .
Applies to
GetObjectStateEntry(Object)
Returns an ObjectStateEntry for the specified object.
public virtual System.Data.Entity.Core.Objects.ObjectStateEntry GetObjectStateEntry (object entity);
abstract member GetObjectStateEntry : obj -> System.Data.Entity.Core.Objects.ObjectStateEntry
override this.GetObjectStateEntry : obj -> System.Data.Entity.Core.Objects.ObjectStateEntry
Public Overridable Function GetObjectStateEntry (entity As Object) As ObjectStateEntry
Parameters
- entity
- Object
The Object to which the retrieved ObjectStateEntry belongs.
Returns
The corresponding ObjectStateEntry for the given Object .
Exceptions
No entity for the specified Object exists in the ObjectStateManager .
Applies to
Entity Framework