我想知道如何在不插入任何实体的情况下使用架构创建 Azure 表。使用以下代码,它会在 azure 上创建一个表:
StorageCredentialsAccountAndKey accountAndKey = new StorageCredentialsAccountAndKey("accountName", "accountKey");
CloudStorageAccount storageAccount = new CloudStorageAccount(accountAndKey, true);
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
string tableName = "mytable";
tableClient.CreateTableIfNotExist(tableName);
如何在创建表时指定架构。我需要创建一个空表(没有任何记录),其中包含 CustomerFirstName、CustomerLastName、Age 等自定义字段。
问候, 维维克