Partager via


ServiceClient.CreateAsync Method

Definition

Overloads

CreateAsync(Entity)

Create an entity and process any related entities

CreateAsync(Entity, CancellationToken)

Create an entity and process any related entities

CreateAsync(Entity)

Create an entity and process any related entities

public System.Threading.Tasks.Task<Guid> CreateAsync (Microsoft.Xrm.Sdk.Entity entity);
abstract member CreateAsync : Microsoft.Xrm.Sdk.Entity -> System.Threading.Tasks.Task<Guid>
override this.CreateAsync : Microsoft.Xrm.Sdk.Entity -> System.Threading.Tasks.Task<Guid>
Public Function CreateAsync (entity As Entity) As Task(Of Guid)

Parameters

entity
Entity

entity to create

Returns

The ID of the created record

Implements

Remarks

The call returns immediately while the create operation is processed asynchronously.

Applies to

CreateAsync(Entity, CancellationToken)

Create an entity and process any related entities

public System.Threading.Tasks.Task<Guid> CreateAsync (Microsoft.Xrm.Sdk.Entity entity, System.Threading.CancellationToken cancellationToken);
abstract member CreateAsync : Microsoft.Xrm.Sdk.Entity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Guid>
override this.CreateAsync : Microsoft.Xrm.Sdk.Entity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Guid>
Public Function CreateAsync (entity As Entity, cancellationToken As CancellationToken) As Task(Of Guid)

Parameters

entity
Entity

entity to create

cancellationToken
CancellationToken

Propagates notification that operations should be canceled.

Returns

The ID of the created record

Implements

Remarks

The call returns immediately while the create operation is processed asynchronously.

Applies to