Share via


ObjectStateManager.TryGetObjectStateEntry Method

Definition

Overloads

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 .

TryGetObjectStateEntry(EntityKey, ObjectStateEntry)

Tries to retrieve the corresponding ObjectStateEntry for the object or relationship with the specified EntityKey .

public virtual bool TryGetObjectStateEntry (System.Data.Entity.Core.EntityKey key, out System.Data.Entity.Core.Objects.ObjectStateEntry entry);
abstract member TryGetObjectStateEntry : System.Data.Entity.Core.EntityKey *  -> bool
override this.TryGetObjectStateEntry : System.Data.Entity.Core.EntityKey *  -> bool
Public Overridable Function TryGetObjectStateEntry (key As EntityKey, ByRef entry As ObjectStateEntry) As Boolean

Parameters

key
EntityKey

The given EntityKey.

entry
ObjectStateEntry

When this method returns, contains an ObjectStateEntry for the given EntityKey This parameter is passed uninitialized.

Returns

A Boolean value that is true if there is a corresponding ObjectStateEntry for the given EntityKey ; otherwise, false.

Exceptions

A null (Nothing in Visual Basic) value is provided for key .

Applies to

TryGetObjectStateEntry(Object, ObjectStateEntry)

Tries to retrieve the corresponding ObjectStateEntry for the specified Object .

public virtual bool TryGetObjectStateEntry (object entity, out System.Data.Entity.Core.Objects.ObjectStateEntry entry);
abstract member TryGetObjectStateEntry : obj *  -> bool
override this.TryGetObjectStateEntry : obj *  -> bool
Public Overridable Function TryGetObjectStateEntry (entity As Object, ByRef entry As ObjectStateEntry) As Boolean

Parameters

entity
Object

The Object to which the retrieved ObjectStateEntry belongs.

entry
ObjectStateEntry

When this method returns, contains the ObjectStateEntry for the given EntityKey This parameter is passed uninitialized.

Returns

A Boolean value that is true if there is a corresponding ObjectStateEntry for the given object; otherwise, false.

Applies to