示例#1
0
        public void SendDifferentEntityToTable()
        {
            TableBatchOperation batchOperation = new TableBatchOperation();

            var dog = new AnimalEntity("Lassie")
            {
                Color = "Mixed"
            };
            var insertOperation = TableOperation.InsertOrReplace(dog);

            batchOperation.Add(insertOperation);

            dog = new AnimalEntity("Pluto")
            {
                Color = "Mixed"
            };
            insertOperation = TableOperation.InsertOrMerge(dog);
            batchOperation.Add(insertOperation);

            cloudTable.ExecuteBatch(batchOperation);
        }
示例#2
0
    public void SendDifferentEntityToTable()
    {
      TableBatchOperation batchOperation = new TableBatchOperation();

      var dog = new AnimalEntity("Lassie")
      {
        Color = "Mixed"
      };
      var insertOperation = TableOperation.InsertOrReplace(dog);
      batchOperation.Add(insertOperation);

      dog = new AnimalEntity("Pluto")
      {
        Color = "Mixed"
      };
      insertOperation = TableOperation.InsertOrMerge(dog);
      batchOperation.Add(insertOperation);

      cloudTable.ExecuteBatch(batchOperation);
    }