Пример #1
0
        public virtual async Task UpdateAsync(BackgroundJobInfo jobInfo)
        {
            var backgroundJobRecord = await BackgroundJobRepository.FindAsync(jobInfo.Id);

            if (backgroundJobRecord == null)
            {
                return;
            }

            ObjectMapper.Map(jobInfo, backgroundJobRecord);
            await BackgroundJobRepository.UpdateAsync(backgroundJobRecord);
        }
Пример #2
0
 public virtual async Task <BackgroundJobInfo> FindAsync(Guid jobId)
 {
     return(ObjectMapper.Map <BackgroundJobRecord, BackgroundJobInfo>(
                await BackgroundJobRepository.FindAsync(jobId)
                ));
 }