protected void CancelJob(Guid guid) { using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.AutoCommit)) { var job = new JobInstance(context); job.Guid = guid; job.Load(); job.LoadParameters(); job.Cancel(); } }
protected JobInstance LoadJob(Guid guid) { using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.DirtyRead)) { var job = new JobInstance(context); job.Guid = guid; job.Load(); job.LoadParameters(); return job; } }