使用Azure.Data.Table TableClient
进行一些简单的查询,并且响应不包括ETag。
我的实体根据需要继承ITableEntity
,因此具有ETag属性。
代码非常简单:
var tableClient = new TableClient( new Uri(storageUri), tableName, new TableSharedKeyCredential(accountName, storageAccountKey)); var response = await tableClient.GetEntityAsync<TEntity>(partitionKey, rowKey); return response.Value;
产生的输出为:
{ "partitionKey": "Partition Key", "rowKey": "RowKey", "timestamp": "2023-02-07T20:55:45.6532507+00:00", "eTag": {}, "forename": "Forename", "surname": "Surname", "mobile": "Mobile", "address": "Address" }
我有点无所适从,因为它都是在TableClient中处理的,所以我无法调试那么多。
任何想法都非常感谢。