Tag: dml

DynamoDB .NET – 删除表中的所有项目

我正在学习如何使用DynamoDB for .net而且我有一个疑问,是否有正确的方法从现有表中删除所有项目?我的意思是,我不想删除表,只是清空它。 我已经阅读了有关批处理的内容,但它们对我没什么帮助。 我有这个 private string DeleteAllFromTable() { string result = string.Empty; try { var request = new BatchWriteItemRequest { RequestItems = new Dictionary<string, List> { { this.Tablename, new List { new WriteRequest { DeleteRequest = new DeleteRequest { Key = new Dictionary() { { “Id”, new AttributeValue { S = “a” } } […]