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
Target | Versions |
---|---|
.NET Standard 2.0 | 100.12 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.12 - 200.5 |
Xamarin.Android | 100.12 - 100.14 |
Xamarin.iOS | 100.12 - 100.15 |
UWP | 100.12 - 200.5 |
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
Target | Versions |
---|---|
.NET Standard 2.0 | 100.10 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.10 - 200.5 |
Xamarin.Android | 100.10 - 100.15 |
Xamarin.iOS | 100.10 - 100.15 |
UWP | 100.10 - 200.5 |