DataServiceContext.TryGetEntity<TEntity> Method
.NET Framework 4.5
Test retrieval of an entity being tracked by the DataServiceContext by reference to the URI of the entity.
Namespace: System.Data.Services.Client
Assembly: System.Data.Services.Client (in System.Data.Services.Client.dll)
public bool TryGetEntity<TEntity>( Uri identity, out TEntity entity ) where TEntity : class
Type Parameters
- TEntity
The type of the entity.
Parameters
- identity
- Type: System.Uri
The URI of the tracked entity to be retrieved.
- entity
- Type: TEntity
The entity to be retrieved.
Return Value
Type: System.BooleanIf an entity is found at resourceUri, the entity is returned in the out parameter entity and true is returned. If no entity is found, false is returned.
| Exception | Condition |
|---|---|
| ArgumentNullException | When identity is null. |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.