public async Task Execute(bool useAllKeys = false)
        {
            if (_Disposed)
            {
                throw new ObjectDisposedException(JobName);
            }

            _WorkflowDbContext.EnsureNoChangesOrTransaction();
            _ContentDbContext.EnsureNoChangesOrTransaction();

            await CopyInput(useAllKeys);
            await BuildBatches();
            await CommitResults();
        }
        public void Write(ExposureKeySetEntity[] things)
        {
            var entities = things.Select(x => new ExposureKeySetContentEntity
            {
                Content              = x.Content,
                CreatingJobName      = x.CreatingJobName,
                CreatingJobQualifier = x.CreatingJobQualifier,
                Release              = x.Created,
            }).ToList();

            foreach (var i in entities)
            {
                i.PublishingId = _PublishingId.Create(i.Content);
            }

            using (_DbContext.EnsureNoChangesOrTransaction().BeginTransaction())
            {
                _DbContext.BulkInsertAsync(entities);
                _DbContext.SaveAndCommit();
            }
        }