0

[azuretablenoobと入力してください]AzureTable Storageに関するすべての記事で、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";

これが私が受け取る完全なエラーです: テーブル挿入エラー

ご協力いただきありがとうございますPS:Windows Azure SDKが最新であること、StorageClientDLLがv1.1.0.0であることを確認しました

4

1 に答える 1

2

System.Data.Services.Client.dll への参照とそれに対する using 宣言はありますか?

于 2012-05-02T19:31:40.963 に答える