public static Job ToDomain(this JobDto job, IJobConfigurationMapper mapper) { if (job == null) { return(null); } return(new Job() { Name = job.Name, Description = job.Description, ConcurrentLimit = job.ConcurrentLimit, Enabled = job.Enabled, LastUpdated = job.LastUpdated, TriggerCronSyntax = job.TriggerCronSyntax, Configuration = mapper.Deserialize(job.Configuration) }); }
public static Job ToDomain(this JobModel model, IJobConfigurationMapper configMapper) { if (model == null) { return(null); } return(new Job { Name = model.Name, Description = model.Description, ConcurrentLimit = model.ConcurrentLimit, Enabled = model.Enabled, //JobType = model.JobType, TriggerCronSyntax = model.TriggerCronSyntax, Configuration = configMapper.Deserialize(model.Configuration), LastUpdated = model.LastUpdated }); }