Azure表将行插入到TableServiceContext中
[输入azure表noob] 我能找到的所有关于Azure表存储的文章都在Microsoft.WindowsAzure.StorageClient中指定了一个与TableServiceContext类相关的AddObject方法。不幸的是,当我尝试引用AddObject和SaveChanges方法时,VS说没有这样的方法。这是我的密码:Azure表将行插入到TableServiceContext中,azure,cloud,azure-table-storage,Azure,Cloud,Azure Table Storage,[输入azure表noob] 我能找到的所有关于Azure表存储的文章都在Microsoft.WindowsAzure.StorageClient中指定了一个与TableServiceContext类相关的AddObject方法。不幸的是,当我尝试引用AddObject和SaveChanges方法时,VS说没有这样的方法。这是我的密码: CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
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";
以下是我收到的全部错误:
谢谢你的帮助
注意:我确实确保了我的Windows Azure SDK是最新的,我的StorageClient DLL是v1.1.0.0
你有System.Data.Services.Client.DLL的引用和使用声明吗?
太棒了!谢谢我发现的文档没有为该库指定引用,我不知道它依赖于该标准库。。。成功了。