はい!あなたの理解は正しいです。
あなたは正しいconnectionString
とtableName
と、次のC#のコードを実行することによってそれをテストすることができます。
class MyEntity : TableEntity
{
public string MyString { get; set; }
}
class MySecondEntity : TableEntity
{
public string MySecondString { get; set; }
}
public void MergeTest()
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable table = tableClient.GetTableReference(tableName);
table.CreateIfNotExists();
// Insert an entity
table.Execute(TableOperation.Insert(new MyEntity()
{ PartitionKey = "partition", RowKey = "row", MyString = "randomString" }));
// Merge with a different class
table.Execute(TableOperation.InsertOrMerge(new MySecondEntity()
{ PartitionKey = "partition", RowKey = "row", MySecondString = "randomSecondString" }));
}
あなたは次のプロパティを使用してテーブル内の単一のエンティティで終わる必要があります。
{
PartitionKey = "partition",
RowKey = "row",
MyString = "randomString",
MySecondString = "randomSecondString"
}