/// <inheritdoc />
        public Task <IEnumerable <TableBatchResult> > BatchInsertOrUpdateAsync <T>(
            IEnumerable <T> entities,
            int batchSize = 100,
            CancellationToken cancellationToken = default) where T : ITableEntity, new()
        {
            if (entities == null)
            {
                throw new ArgumentNullException(nameof(entities));
            }

            if (batchSize <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(batchSize));
            }

            return(_executionLogger.ExecuteAndLogAsync(
                       async() => await BatchInsertOrUpdateInternalAsync(entities, batchSize, cancellationToken),
                       nameof(BatchInsertOrUpdateAsync)));
        }