예제 #1
0
 public bool UpdateItem <T>(UpdateExpression <T> update)
 {
     try
     {
         Exec(() => DynamoDb.UpdateItem(update));
         return(true);
     }
     catch (ConditionalCheckFailedException)
     {
         return(false);
     }
 }
예제 #2
0
        public async Task <bool> UpdateItemAsync <T>(UpdateExpression <T> update, CancellationToken token = default)
        {
            try
            {
                await ExecAsync(async() =>
                                await DynamoDb.UpdateItemAsync(update, token).ConfigAwait()).ConfigAwait();

                return(true);
            }
            catch (ConditionalCheckFailedException)
            {
                return(false);
            }
        }