2012-05-02 16 views
0

[azure table noob] Azureテーブルストレージに関するすべての記事は、Microsoft.WindowsAzure.StorageClient内のTableServiceContextクラスに関連するAddObjectメソッドを指定しています。 Unfortuantely、私が試して、AddObjectとSaveChangesメソッドを参照すると、VSはそのようなメソッドはないと言います。ここに私のコードは次のとおりです。AzureテーブルTableServiceContextへのローの挿入

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用 Table Insert Error

ありがとう:私は私のWindows AzureのSDKが最新であることを確認しなかった、私のStorageClient DLLはV1であります.1.0.0

答えて

2

System.Data.Services.Client.dllへの参照とその宣言を使用していますか?

+0

恐ろしい!ありがとう...私が見つけたドキュメントには、そのライブラリに指定されているリファレンスがありませんでした。その標準ライブラリに依存しているかどうかはわかりませんでした。 –

関連する問題