Azure storage 如何检查azure表存储中是否存在实体的属性

Azure storage 如何检查azure表存储中是否存在实体的属性,azure-storage,Azure Storage,以下是我想要的: if("phone" property exists in entity){ //get value "phone"=>$entity->getProperty("phone")->getValue(); } 在azure页面上找不到任何内容。请使用DynamicTableEntity类执行此操作。从没有泛型TableEntity类的表检索实体时,实体的类型将为DynamicTableEntity。此类具有IDictionary类型的属性类Properti

以下是我想要的:

if("phone" property exists in entity){
//get value
"phone"=>$entity->getProperty("phone")->getValue();

}
在azure页面上找不到任何内容。

请使用DynamicTableEntity类执行此操作。从没有泛型TableEntity类的表检索实体时,实体的类型将为DynamicTableEntity。此类具有IDictionary类型的属性类Properties。因此,您应该有这样的代码(我不知道这是否可以编译,只是从头开始写):

使用DynamicTableEntity类来实现这一点。从没有泛型TableEntity类的表检索实体时,实体的类型将为DynamicTableEntity。此类具有IDictionary类型的属性类Properties。因此,您应该有这样的代码(我不知道这是否可以编译,只是从头开始写):


您可以在此处找到更多信息:您可以在此处找到更多信息:
if(entity.Properties.Keys.Contains("phone"))
{
var x = entity.Properties["phone"].toString() //Or cast it to whatever you need
}