i am using dynamodb service for data insertion. But its working randomly. sometimes it insert values and most of the times it is skipping. Although i am sending different primary key all times. Following code i am using. Please advice. Thank you
Dictionary<string, AttributeValue> attributes = new Dictionary<string, AttributeValue>();
foreach (KeyValuePair<string, object> entry in paramDictioonary)
{
if (entry.Value == "")
{
attributes[entry.Key.ToString()] = new AttributeValue { S = "Empty Value" };
}
else
attributes[entry.Key.ToString()] = new AttributeValue { S = entry.Value.ToString() };
}
AmazonDynamoDBClient client = new AmazonDynamoDBClient();
{
PutItemRequest request = new PutItemRequest
{
TableName = "tableNamehere",
Item = attributes
};
client.PutItem(request);
}
Please help. Thanks in advance
Kind Regards.