public async Task UpdateJob(JobModel job, CancellationToken cancellationToken = default(CancellationToken)) { if (job.Id < 1) { Jobs.Add(job); } else { Jobs.Attach(job).State = EntityState.Modified; } await SaveChangesAsync(cancellationToken); }