我正在尝试从表中检索一些实体。我成功地能够取回字符串,但是当我尝试获取 GUID 时,它返回为空(全为零)。
[DataContract]
public class myEntity : TableEntity
{
[DataMember(Name = "ID")]
public Guid Id { get; set; }
[DataMember(Name = "Name")]
public string Name { get; set; }
[DataMember(Name = "City")]
public string City { get; set; }
}
...
var storageAccount = CloudStorageAccount.Parse(conStr);
var tableClient = storageAccount.CreateCloudTableClient();
var table = tableClient.GetTableReference(tblName);
TableQuery<myEntity> query = new TableQuery<myEntity>().Where(string.Empty);
如何在表存储中获取正确的 GUID 值?它与 TableEntity.ReadEntity 相关吗?