Metodo ObjectStateManager.TryGetObjectStateEntry (EntityKey, ObjectStateEntry%)
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Tenta di recuperare l'oggetto ObjectStateEntry corrispondente per l'oggetto o la relazione con l'oggetto EntityKey specificato.
Spazio dei nomi: System.Data.Entity.Core.Objects
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
Public Overridable Function TryGetObjectStateEntry ( _
key As EntityKey, _
<OutAttribute> ByRef entry As ObjectStateEntry _
) As Boolean
'Utilizzo
Dim instance As ObjectStateManager
Dim key As EntityKey
Dim entry As ObjectStateEntry
Dim returnValue As Boolean
returnValue = instance.TryGetObjectStateEntry(key, _
entry)
public virtual bool TryGetObjectStateEntry(
EntityKey key,
out ObjectStateEntry entry
)
public:
virtual bool TryGetObjectStateEntry(
EntityKey^ key,
[OutAttribute] ObjectStateEntry^% entry
)
abstract TryGetObjectStateEntry :
key:EntityKey *
entry:ObjectStateEntry byref -> bool
override TryGetObjectStateEntry :
key:EntityKey *
entry:ObjectStateEntry byref -> bool
public function TryGetObjectStateEntry(
key : EntityKey,
entry : ObjectStateEntry
) : boolean
Parametri
- key
Tipo: System.Data.Entity.Core.EntityKey
Oggetto EntityKey specificato.
- entry
Tipo: System.Data.Entity.Core.Objects.ObjectStateEntry%
Quando termina, questo metodo contiene un oggetto ObjectStateEntry per l'oggetto EntityKey specificato. Questo parametro viene passato senza inizializzazione.
Valore restituito
Tipo: System.Boolean
Valore booleano che è true se è presente un oggetto ObjectStateEntry corrispondente per l'oggetto EntityKey specificato; in caso contrario, false.
Eccezioni
Eccezione | Condizione |
---|---|
ArgumentNullException | Viene fornito un valore Null (Nothing in Visual Basic) per key. |