Entity.ToEntity<T> Method ()

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Gets the entity as the specified type.

Namespace:   Microsoft.Xrm.Sdk
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

public T ToEntity<T>()
where T : Entity
Public Function ToEntity(Of T As Entity) As T

Return Value

Type: T

Type: Entity
The entity as the specified type.

Type Parameters

  • T
    Type: Entity. The entity type to return.

Examples

Account retrievedAccount = service.Retrieve(account.LogicalName, account.Id, new ColumnSet("primarycontactid")).ToEntity<Account>();

See Also

Entity Class
Microsoft.Xrm.Sdk Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright