Exemplo n.º 1
0
        private async Task UpdateJobInfoAsync(IksInJobEntity jobInfo, string lastWrittenBatchTag)
        {
            // Keep track of the last batch we wrote to the database
            jobInfo.LastBatchTag = lastWrittenBatchTag;
            // And keep track of the last time this job was run
            jobInfo.LastRun = _dateTimeProvider.Snapshot;

            // Persist updated jobinfo to database.
            await _iksInDbContext.SaveChangesAsync();
        }
Exemplo n.º 2
0
        private IksInJobEntity GetJobInfo()
        {
            var result = _iksInDbContext.InJob.SingleOrDefault();

            if (result != null)
            {
                return(result);
            }

            result = new IksInJobEntity();
            _iksInDbContext.InJob.Add(result);
            return(result);
        }