I'd like to construct a CreateTableRequest
object from data annotations in a class. It looks like Amazon provides DynamoDBMapper
in the Java SDK, which makes this process simple.
How can I do the same in .NET/C#?
AmazonDynamoDB dynamoDBClient = new AmazonDynamoDBClient();
DynamoDBMapper mapper = new DynamoDBMapper(dynamoDBClient);
CreateTableRequest req = mapper.generateCreateTableRequest(TestClass.class);
// Table provision throughput is still required since it cannot be specified in your POJO
req.setProvisionedThroughput(new ProvisionedThroughput(5L, 5L));
// Fire off the CreateTableRequest using the low-level client
dynamoDBClient.createTable(req);