2017-02-20 9 views
0

Azureの機能CRUD

私は、挿入作業を持っていますが、エンティティを返すと更新を行う方法を知っているように、あまりにも削除されます。

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log, IAsyncCollector<User> outputTable) 
    { 
     log.Info($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}"); 

     var user = new User(); 
     user.PartitionKey = "Users"; 
     user.RowKey = DateTime.Now.Ticks.ToString(); 
     user.UserId = "aaaa"; 

     user.Country = "uk"; 
     await outputTable.AddAsync(user); 

.... 

答えて

2

あなたはCloudTableクラスのインスタンスにあなたの関数をバインドすることができ、その後、あなたはあなたの手ですべてのAPIを取得します。

私はあなたの関数定義でをCloudTableに置き換えて、有効な出力バインディングを持っていれば使用量を調整できるはずだと思います。

Azure Functions Storage table bindingsの下にある「出力の使用法」を参照してください。

+0

はい、ここでCloudTableとCRUDを使用している場合はここで動作すると思います:https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-tables – raklos

関連する問題