Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Entity.ToEntity<T> Method
Definition
- Namespace:
- Microsoft.Xrm.Sdk
- Assembly:
- Microsoft.Xrm.Sdk.dll
- Package:
- Microsoft.PowerPlatform.Dataverse.Client v1.2.10
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.
Gets the entity as the specified type.
public:
generic <typename T>
where T : Microsoft::Xrm::Sdk::Entity T ToEntity();
public T ToEntity<T>() where T : Microsoft.Xrm.Sdk.Entity;
member this.ToEntity : unit -> 'T (requires 'T :> Microsoft.Xrm.Sdk.Entity)
Public Function ToEntity(Of T As Entity) () As T
Type Parameters
- T
The entity type to return.
Returns
T
The entity as the specified type.
Examples
Account retrievedAccount = service.Retrieve(account.LogicalName, account.Id, new ColumnSet("primarycontactid")).ToEntity<Account>();
