Show / Hide Table of Contents

Method ApplyEditsAsync

ApplyEditsAsync(CancellationToken)

Applies all local edits in all tables to the service.

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

A System.Threading.CancellationToken with which to cancel the operation if required.

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

A task that represents the asynchronous apply edits operation. The value of the task result contains a list of loaded FeatureTableEditResult objects.

Remarks

This method applies all feature table edits to the feature service as a single transaction. If one of the edits fails, all edits are rolled-back, and geodatabase integrity is preserved. This is the recommended approach to applying edits and is typically more efficient than calling ServiceFeatureTable.ApplyEditsAsync() on each table.

However, this method can only succeed if all tables either support or do not support global IDs. A mix of global ID support is not permitted and will result in GeodatabaseGlobalIdSupportMismatchException.

Use CanUseServiceGeodatabaseApplyEdits to determine whether you can successfully apply your edits through this method.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.12 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.12 - 200.7
Xamarin.Android100.12 - 100.14
Xamarin.iOS100.12 - 100.15
UWP100.12 - 200.7

ApplyEditsAsync()

Applies all local edits in all tables to the service.

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

A task that represents the asynchronous apply edits operation. The value of the task result contains a list of loaded FeatureTableEditResult objects.

Remarks

This method applies all feature table edits to the feature service as a single transaction. If one of the edits fails, all edits are rolled-back, and geodatabase integrity is preserved. This is the recommended approach to applying edits and is typically more efficient than calling ServiceFeatureTable.ApplyEditsAsync() on each table.

However, this method can only succeed if all tables either support or do not support global IDs. A mix of global ID support is not permitted and will result in GeodatabaseGlobalIdSupportMismatchException.

Use CanUseServiceGeodatabaseApplyEdits to determine whether you can successfully apply your edits through this method.

Applies to

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