Deleting features in a service through the .NET SDK in ArcGIs pro (2.9.5) is very slow:
Consider for example this code: if the where clause results in 100 records the code results in 100 http calls to the service. It is not efficient.
var query = new QueryForIds(endpoint) { Where = GetEqualsClause(fieldName, $"'{fieldValue}'") };
var deleteIds = (await QueryForIds(query)).ObjectIds?.ToList() ?? new List<long>();
var response = await DeleteFeatures(new DeleteFeatures(endpoint)
{
ObjectIds = deleteIds,
Where = GetEqualsClause(fieldName, $"'{fieldValue}'")
});
If you delete the same number of features with a rest http call, it can be done in 1 query and is 10 of times faster.
It would be great if there was "a delete features end-point in ArcGIS Pro .NET SDK" that can delete multiple records at the same time