Azure Function into Table Storage
To add a new entry to Table you should bind to IAsyncCollector
instead of entity itself, then create a new entity and call AddAsync
. The following snippet works for me:
var attributes = new Attribute[]
{
new StorageAccountAttribute("..."),
new TableAttribute("...")
};
var output = await binder.BindAsync<IAsyncCollector<MyTableEntity>>(attributes);
await output.AddAsync(new MyTableEntity()
{
PartitionKey = "...",
RowKey = "...",
Minimum = ...,
...
});