문제

When performing an InsertOrReplace operation on Azure Table Storage, is there any way to determine whether the entity was freshly inserted or if a replace occurred?

TableOperation insertOperation = TableOperation.InsertOrReplace(entity);
TableResult result = table.Execute(insertOperation);

TableResult does not seem to indicate this.

도움이 되었습니까?

해결책

InsertOrReplace will result with HttpStatusCode.NoContent on a successful insert or replace. This is a slight deviation from HTTP that suggests 201 (HttpStatusCode.Created) should be the result if something is created or inserted.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top