如何从 Azure Function 中删除 Azure Table 存储条目?

How to remove Azure Table Storage entry from Azure Function?

有什么方法可以使用 Azure Functions API 删除 Azure Table 存储 entry/entries?使用 ICollector<T> 接口可以从 Azure Functions 绑定中对 table 轻松执行的唯一两个操作是读取和写入。我想使用计时器触发的函数安排 table 的定期清理。

Is there any way to delete an Azure Table Storage entry/entries using Azure Functions API? The only two operations that can be easily performed on table from Azure Functions binding are read and write, using ICollector interface.

如您所说,Azure 函数中的 storage tables binding scenarios 正在读取行并写入一行或多行,如果您想删除 Azure 函数中的实体,可以尝试 参考 "Microsoft.WindowsAzure.Storage" 并导入命名空间.

#r "Microsoft.WindowsAzure.Storage"
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;

然后您可以将 C# 代码写入 retrieve the entity and delete it from Azure table storage