public async Task Queue(QueueMessage message, CancellationToken token) { using (var lck = await _dbContext.Lock()) { _dbContext.QueueMessageLst.Add(new Models.QueueMessageModel { CreateDateTime = message.CreationDateTime, SerializedContent = message.SerializedContent, QueueName = message.QueueName }); await _dbContext.SaveChangesAsync(token); } }
public async Task <Subscription> TryReset(string casePlanInstanceId, string casePlanElementInstanceId, string evtName, CancellationToken token) { var result = await _dbContext.SubscriptionLst.FirstOrDefaultAsync(_ => _.CasePlanInstanceId == casePlanInstanceId && _.CasePlanElementInstanceId == casePlanElementInstanceId && _.EventName == evtName, token); if (result == null) { return(null); } result.IsCaptured = false; result.CaptureDateTime = null; await _dbContext.SaveChangesAsync(token); return(result); }
public async Task <int> SaveChanges(CancellationToken token) { using (var lck = await _caseManagementDbContext.Lock()) { return(await _caseManagementDbContext.SaveChangesAsync(token)); } }
public Task <int> SaveChanges(CancellationToken token) { return(_caseManagementDbContext.SaveChangesAsync(token)); }
public Task <int> SaveChanges(CancellationToken token) { return(_dbContext.SaveChangesAsync()); }