public static async Task AddJobHistoryAsync(this IContext db, int jobId, int stepId, string stepName, JobStepOutCome outcome, string message, Nullable<DateTime> runDateTime = null, Nullable<TimeSpan> duration = null) { var jh = new JobHistory() { JobId = jobId, StepId = stepId, StepName = stepName, RunStatus = outcome, Message = message, RunDuration = duration, RunDateTime = runDateTime, }; db.JobHistory.Add(jh); await db.SaveChangesAsync(); }
public static async Task AddJobHistoryAsync(this IContext db, int jobId, int stepId, string stepName, JobStepOutCome outcome, string message, Nullable <DateTime> runDateTime = null, Nullable <TimeSpan> duration = null) { var jh = new JobHistory() { JobId = jobId, StepId = stepId, StepName = stepName, RunStatus = outcome, Message = message, RunDuration = duration, RunDateTime = runDateTime, }; db.JobHistory.Add(jh); await db.SaveChangesAsync(); }