in my application i'm using amazon object persistence model and use DynamoDBContext for operations(CURD and execute queries). i need to know that how can i use conditional update using DynamoDBContext. and it should be asynchronous.
I know the way of doing it using amazon low-level API.
my application is developed using C# Dot Net(4.5) thank you.
.NET Async DynamoDBContext.Save call uses SaveHelper. SaveHelper calls UpdateHelper with an operationConfig. As DynamoDBOperationConfig has a ConditionalOperator field, you may try using that to condition puts/updates on attribute values. Note that you can only enforce conditions on one item in this call. If you do that, you will not be able to overwrite an item that already exists, thereby enforcing uniqueness. I suggest you use a UUID instead of an incrementing number for your hash key though. While atomic counters are supported in the context of one item, they are not supported across all the items of a table. For conditional writes not supported by the DynamoDBContext.Save call, you can always use the low-level API with a condition expression to perform your conditional write.