InsertOrReplace() public method

public InsertOrReplace ( dynamic entity ) : void
entity dynamic
return void
Exemplo n.º 1
0
 public void Test04()
 {
     Credentials credentials = new Credentials(ACCOUNT_NAME, KEY);
     DynamicTableContext context = new DynamicTableContext(TABLE_NAME, credentials);
     dynamic item = new { PartitionKey = "1", RowKey = Guid.NewGuid().ToString(), Value = "Hello World" };
     context.InsertOrReplace(item);
 }
Exemplo n.º 2
0
        public void Test04()
        {
            Credentials         credentials = new Credentials(ACCOUNT_NAME, KEY);
            DynamicTableContext context     = new DynamicTableContext(TABLE_NAME, credentials);
            dynamic             item        = new { PartitionKey = "1", RowKey = Guid.NewGuid().ToString(), Value = "Hello World" };

            context.InsertOrReplace(item);
        }
Exemplo n.º 3
0
 public void Setup()
 {
     var account = new CloudStorageAccount(new StorageCredentialsAccountAndKey(ACCOUNT_NAME, KEY), false);
     var tableClient = account.CreateCloudTableClient();
     tableClient.CreateTableIfNotExist(TABLE_NAME);
     var context = new DynamicTableContext(TABLE_NAME, new Credentials(ACCOUNT_NAME, KEY));
     context.InsertOrReplace(new { PartitionKey = "1", RowKey = "1", Value1 = "TEST" });
 }
Exemplo n.º 4
0
        public void Setup()
        {
            var account     = new CloudStorageAccount(new StorageCredentialsAccountAndKey(ACCOUNT_NAME, KEY), false);
            var tableClient = account.CreateCloudTableClient();

            tableClient.CreateTableIfNotExist(TABLE_NAME);
            var context = new DynamicTableContext(TABLE_NAME, new Credentials(ACCOUNT_NAME, KEY));

            context.InsertOrReplace(new { PartitionKey = "1", RowKey = "1", Value1 = "TEST" });
        }
Exemplo n.º 5
0
        public void Test07()
        {
            Credentials         credentials = new Credentials(ACCOUNT_NAME, KEY);
            DynamicTableContext context     = new DynamicTableContext(TABLE_NAME, credentials);
            var dictionary = new Dictionary <string, object>();

            dictionary["PartitionKey"] = "2";
            dictionary["RowKey"]       = "2";
            dictionary["Value3"]       = "FooBar";
            context.InsertOrReplace(dictionary);
        }
Exemplo n.º 6
0
 public void Test07()
 {
     Credentials credentials = new Credentials(ACCOUNT_NAME, KEY);
     DynamicTableContext context = new DynamicTableContext(TABLE_NAME, credentials);
     var dictionary = new Dictionary<string, object>();
     dictionary["PartitionKey"] = "2";
     dictionary["RowKey"] = "2";
     dictionary["Value3"] = "FooBar";
     context.InsertOrReplace(dictionary);
 }