Show / Hide Table of Contents

Method ApplyEditsAsync

ApplyEditsAsync()

Asynchronously uploads any changes to the local table to the feature service.

Declaration
public Task<IReadOnlyList<EditResult>> ApplyEditsAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<EditResult>>

A task that represents the asynchronous apply edits operation. The value of the task result contains a read-only collection of EditResult objects.

Remarks

ServiceFeatureTable.ApplyEditsAsync() is meant to be used for single table workflows or tables without geodatabase behavior (see below). If an edit on this table can cause an edit to another table due to geodatabase behavior, it is highly recommended to use ServiceGeodatabase.ApplyEditsAsync() instead to prevent data inconsistency, so that dependent edits are all applied or none are (if an error occurs).

For example, when tables have a composite relationship, applying the delete of a destination feature in a composite relationship deletion will only delete the destination feature on the server, therefore causing inconsistency in the data.

Areas which have geodatabase behavior:

  • Composite relationships
  • Annotation feature layers
  • Utility network association deletion semantics
  • Attribute rules

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
Relevant samples
Create, delete, and update features: Add, delete, and update features (geometry and attributes) in a feature layer.
Edit feature attachments: Add, delete, and download attachments for features from a service.

ApplyEditsAsync(CancellationToken)

Asynchronously uploads any changes to the local table to the feature service.

Declaration
public Task<IReadOnlyList<EditResult>> ApplyEditsAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<EditResult>>

A task that represents the asynchronous apply edits operation. The value of the task result contains a read-only collection of EditResult objects.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.14
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.