Dot-Net
Azure 表儲存 InsertOrReplace 結果
在 Azure 表儲存上執行
InsertOrReplace操作時,有沒有辦法確定實體是新插入的還是發生了替換?TableOperation insertOperation = TableOperation.InsertOrReplace(entity); TableResult result = table.Execute(insertOperation);
TableResult似乎沒有表明這一點。
InsertOrReplace將導致HttpStatusCode.NoContent成功插入或替換。這與 HTTP 略有偏差,表明HttpStatusCode.Created如果創建或插入某些內容,結果應該是 201 ( )。