Database Reference
In-Depth Information
Using the AWS SDK for .NET
To scan a table using a .NET API, you need to create the scan request and invoke the
scan method by providing the details as shown in the following code:
var request = new ScanRequest
{
TableName = "Book",
};
var response = dynamoDBClient.Scan(request);
var result = response.ScanResult;
You can also specify additional optional attributes, such as a scan filter and attributes to
get. We can get the paginated results for the scan, as shown in the following code:
Dictionary<string, AttributeValue> lastKeyEvaluated = null;
do
{
var request = new ScanRequest
{
TableName = "Book",
Limit = 20,
ExclusiveStartKey = lastKeyEvaluated
};
var response = dynamoDBClient.Scan(request);
foreach (Dictionary<string, AttributeValue> item
in response.Items)
{
PrintItem(item);
}
lastKeyEvaluated = response.LastEvaluatedKey;
} while (lastKeyEvaluated.Count != 0);
Search WWH ::




Custom Search