Database Reference
In-Depth Information
}
},
new Dictionary<string, AttributeValue>()
{
{ "bookId", new AttributeValue { N = "2011" } }
}
}
}
}
}
};
var response = dynamodbClient.BatchGetItem(request);
BatchWriteItems
This API allows us to put and delete multiple items at a time. You need to create a proper
batch write item request specifying what needs to be added and what needs be deleted.
In the following code, we are adding one item in the Author table and then deleting one
item from the same table:
string tableName = "Author";
var request = new BatchWriteItemRequest
{
{
tableName, new List<WriteRequest>
{
new WriteRequest
{
PutRequest = new PutRequest
{
Item = new Dictionary<string,AttributeValue>
{
{ "authId", new AttributeValue { N =
"5001" } },
{ "name", new AttributeValue { S = "James Bond" }
Search WWH ::




Custom Search