Exemple #1
0
 internal static ElasticSearchIndexJob ToDto(Entities.Jobs.ElasticSearchIndexJob job, bool include_relations, bool include_invisible_media)
 {
     if (job == null)
     {
         return(null);
     }
     return(new ElasticSearchIndexJob
     {
         Id = job.Id,
         JobStatus = job.Status,
         Subject = SubjectRepository.ToDto(job.Subject, include_relations, include_invisible_media),
         SubjectStatus = job.SubjectStatus
     });
 }
Exemple #2
0
        internal static Entities.Jobs.ElasticSearchIndexJob ToEntity(ElasticSearchIndexJob job, MintPlayerContext mintplayer_context)
        {
            if (job == null)
            {
                return(null);
            }
            var entity_job = new Entities.Jobs.ElasticSearchIndexJob
            {
                Id            = job.Id,
                Status        = job.JobStatus,
                Subject       = mintplayer_context.Subjects.Find(job.Subject.Id),
                SubjectStatus = job.SubjectStatus
            };

            return(entity_job);
        }