Database Reference
In-Depth Information
Using the AWS SDK for .NET
Like Java, AWS also provides an SDK for .NET and PHP development. The following are
some examples that show how to create, update, delete, and list tables using .NET.
Create table
To perform any operation in .NET, we need to create an instance of the DynamoDB client
first:
var configuration = new AmazonDynamoDBConfig();
configuration.ServiceURL =
System.Configuration.ConfigurationManager.AppSettings["ServiceURL"];
dynamoDBClient = new AmazonDynamoDBClient(configuration);
Once the client is ready, you can build a create table
request and invoke the same using dynamoDBClient
var createTableRequest = new CreateTableRequest
{
// Create Attribute definition
AttributeDefinitions = new
List<AttributeDefinition>()
{ new AttributeDefinition {
AttributeName = "bookId",
AttributeType = "N"
},
new AttributeDefinition
{
AttributeName = "yop",
AttributeType = "N"
}
},
// Create primary key schema
KeySchema = new List<KeySchemaElement>
{
new KeySchemaElement
{
AttributeName = "bookId",
KeyType = "HASH"
},
Search WWH ::




Custom Search