/// <summary> /// Sets the configuration Value from the configuration Table. Response is a JSON format /// </summary> /// <param name="configKey">This is a rowkey in Azure Table</param> /// <param name="processKey">This is the partition key in Azure Table</param> /// <param name="processKey">This is the value in Azure Table</param> /// <returns>Returns true if insert is successful</returns> public static bool SetConfigurationValue(string configKey, string processKey, string configurationValue) { bool result = true; try { string storageAccountString = CloudConfigurationManager.GetSetting(butlerStorageConnectionConfigurationKey); CloudStorageAccount account = CloudStorageAccount.Parse(storageAccountString); CloudTableClient tableClient = account.CreateCloudTableClient(); CloudTable configTable = tableClient.GetTableReference(configurationTableName); ButlerConfigurationEntity configEntity = new ButlerConfigurationEntity(configKey, processKey); configEntity.ConfigurationValue = configurationValue; // Create the TableOperation that inserts the customer entity. TableOperation insertOperation = TableOperation.Insert(configEntity); // Execute the insert operation. TableResult insertResult = configTable.Execute(insertOperation); if (insertResult == null) result = false; } catch (Exception ex) { result = false; throw ex; } return result; }