【发布时间】:2012-05-03 03:35:58
【问题描述】:
[进入天蓝色表菜鸟] 我能找到的所有关于 Azure 表存储的文章都在 Microsoft.WindowsAzure.StorageClient 中指定了与 TableServiceContext 类相关的 AddObject 方法。不幸的是,当我尝试引用 AddObject 和 SaveChanges 方法时,VS 说没有这样的方法。这是我的代码:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
RoleEnvironment.GetConfigurationSettingValue("StorageConnectionString")
);
CloudTableClient tableClient = new CloudTableClient(storageAccount.TableEndpoint.ToString(), storageAccount.Credentials);
tableClient.CreateTableIfNotExist("ODATImageResizeErrors");
TableServiceContext context = tableClient.GetDataServiceContext();
ImageResizeErrorEntity entity = new ImageResizeErrorEntity();
entity.ErrorDescription = "Error resizing image";
entity.InnerException = ex.InnerException.ToString();
entity.ImageTypeId = imageTypeId;
entity.SkuId = skuId;
entity.RowKey = Guid.NewGuid().ToString();
entity.PartitionKey = "Errors";
这是我收到的完整错误:
感谢您的帮助 P.S.:我确实确保我的 Windows Azure SDK 是最新的,我的 StorageClient DLL 是 v1.1.0.0
【问题讨论】:
标签: azure cloud azure-table-storage