DynamoDB and .NET Persistence Model using "ADD" values ​​instead of overwriting

I have several DynamoDB tables that will act as aggregate data warehouses (we “collapse” reports on the fly. I was hoping to use .NET: Object Persistence Model (where you create classes that have annotations). The problem is that the DynamoDBContext object seems to have a Save method, not a Save and Add Values ​​method. Since the time between returning an object from Dynamo and writing time to this line can again be more than the trivial amount and more than one stream may try to increase, I do not want the increment was running on .NET, instead I want a .ADD AttributeAction, but I'm not sure if the attribute action can be specified using the object persistence model. Does anyone know if this is possible?

[DynamoDBTable("my_table")]
public class MyRecord
{
    [DynamoDBHashKey(AttributeName = "my_id")]
    public string MyID{ get; set; }

    /// <summary>
    /// Hash of the Region and Country fields for unique data lookup from DynamoDB
    /// </summary>
    [DynamoDBRangeKey(AttributeName = "location")]
    public string Location { get; set; }

    [DynamoDBProperty("my_count")]
    public int MyCount{ get; set; }

- . , MyID "", . , mycount, 1 .NET, . "" "1" mycount, - - .

+4
1
0

Source: https://habr.com/ru/post/1533764/


All Articles