サンプルストレージクライアントライブラリを再構築する必要はありません。v1.2は、自動的に3つのDLL参照をロールに追加します。
- Microsoft.WindowsAzure.Diagnostics
- Microsoft.WindowAzure.ServiceRuntime
- Microsoft.WindowsAzure.StorageClient
テーブルを作成するには、最初にテーブルを設定する必要があります。
- TableServiceEntity(たとえば、「MyEntity」)から派生したクラスを作成します-
- TableServiceContextからテーブルクラスを派生させます(たとえば、「MyEntityDataServiceContext」)。そのクラスで、CreateQuery <MyEntity>( "MyEntities");を返すDataServiceQuery <MyEntity>()タイプのプロパティを作成します。
それが済んだら、次のようなコードでテーブルを作成します。
var account = CloudStorageAccount.DevelopmentStorageAccount;
CloudTableClient.CreateTablesFromModel(typeof(MyEntityDataServiceContext),account.TableEndpoint.AbsoluteUri, account.Credentials);
これの詳細については、Azureプラットフォームトレーニングキットをダウンロードしてください。これらすべてをカバーする「ExploringWindowsAzureStorage」というラボがあります。