Skip to content

Instantly share code, notes, and snippets.

@OksanaH
Last active Dec 4, 2020
Embed
What would you like to do?
for (var i = 0; i <= 100; i++)
{
var putItemRequest = new PutItemRequest
{
TableName = sourceTableName,
Item = new Dictionary<string, AttributeValue>()
{
{"City", new AttributeValue{S=cities[(new Random()).Next(cities.Length)] } },
{"Date", new AttributeValue{S=GetRandom2020Date() } },
{"Highest", new AttributeValue{N=(new Random()).Next(20,30).ToString() } },
{"Lowest", new AttributeValue{N=(new Random()).Next(1,10).ToString() } }
}
};
await client.PutItemAsync(putItemRequest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment