コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public async Task <int> SaveChanges(CancellationToken token)
 {
     using (var lck = await _caseManagementDbContext.Lock())
     {
         return(await _caseManagementDbContext.SaveChangesAsync(token));
     }
 }
コード例 #4
0
 public Task <int> SaveChanges(CancellationToken token)
 {
     return(_caseManagementDbContext.SaveChangesAsync(token));
 }
コード例 #5
0
 public Task <int> SaveChanges(CancellationToken token)
 {
     return(_dbContext.SaveChangesAsync());
 }