Hi Antii,
Never mind the last question I figured it out, u need to call ApplyEditsAsync to update the service. This is what I have so far:
static void Main(string[] args) {
var featureTable = new ServiceFeatureTable(new Uri("https://services7.arcgis.com/yixziXsHssbXEWl5/ArcGIS/rest/services/grex/FeatureServer/0")) {Credential = new ArcGISTokenCredential()}; ((TokenCredential) featureTable.Credential).Token = GetToken().access_token;
var queryParams = new QueryParameters {WhereClause = "DeelplanId = 666"}; //this will return max 2000 features
var queryResult = featureTable.QueryFeaturesAsync(queryParams);
queryResult.Wait();
var features = queryResult.Result.ToList();
foreach (var feature in features) {
if (CheckIfFeatureNeedsUpdate(feature)) {
((ArcGISFeature)feature).LoadAsync().Wait();
feature.Attributes["Kosten"] = 663584d;
//...update all other attributes
featureTable.UpdateFeatureAsync(feature).Wait();
}
}
featureTable.ApplyEditsAsync().Wait();
Console.ReadKey();
}
Is this the right way (from a design point of view ) to sync approximately 2000 records each day? Or is there a better more efficient way?
grt and thx again!