This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Amazon.DynamoDB; | |
using Amazon.DynamoDB.Model; | |
using Amazon.DynamoDB.DataModel; | |
public static void Main(string[] args) { | |
Console.WriteLine("Setting up DynamoDB client"); | |
client = new AmazonDynamoDBClient(RegionEndpoint.USEast1); | |
DynamoDBContext context = new DynamoDBContext(client); | |
SampleData sample = new SampleData(); | |
sample.id = "0000"; | |
sample.name = "ochilab"; | |
sample.value = "日本語"; | |
context.Save(sample); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Amazon.DynamoDB.DataModel; | |
[DynamoDBTable("DynaTest")] | |
class SampleData { | |
[DynamoDBHashKey(AttributeName = "id")] | |
public string id { get; set; } | |
[DynamoDBRangeKey(AttributeName = "name")] | |
public String name { get; set; } | |
[DynamoDBProperty("value")] | |
public String value { get; set; } | |
} |
0 件のコメント:
コメントを投稿