Пример #1
0
        public async ValueTask <OperationResult> DeleteAsync(DbTable table, string partitionKey, string rowKey,
                                                             DataSynchronizationPeriod synchronizationPeriod)
        {
            var(dbPartition, dbRow) = table.DeleteRow(partitionKey, rowKey);

            if (dbPartition == null)
            {
                return(OperationResult.RowNotFound);
            }

            _dataSynchronizer.SynchronizeDelete(table, new[] { dbRow });

            await _persistenceHandler.SynchronizePartitionAsync(table, dbPartition.PartitionKey, synchronizationPeriod);

            return(OperationResult.Ok);
        }