Exemplo n.º 1
0
        public virtual void Init()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudTableClient();
            _table = client.GetTableReference("kalixleotablequery");
            _table.CreateIfNotExists();

            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test1", "test1")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test1", "test2")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test2", "test1")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test2", "test2")));

            _query = new AzureTableQuery<TestEntity>(_table, null);
        }
Exemplo n.º 2
0
        public virtual void Init()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudTableClient();

            _table = client.GetTableReference("kalixleotablequery");
            _table.CreateIfNotExists();

            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test1", "test1")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test1", "test2")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test2", "test1")));
            _table.Execute(TableOperation.InsertOrReplace(BuildEntity("test2", "test2")));

            _query = new AzureTableQuery <TestEntity>(_table, null);
        }
Exemplo n.º 3
0
        public virtual async Task Init()
        {
            var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudTableClient();

            _table = client.GetTableReference("kalixleotablequery");
            await _table.CreateIfNotExistsAsync().ConfigureAwait(false);

            await _table.ExecuteAsync(TableOperation.InsertOrReplace(BuildEntity("test1", "test1"))).ConfigureAwait(false);

            await _table.ExecuteAsync(TableOperation.InsertOrReplace(BuildEntity("test1", "test2"))).ConfigureAwait(false);

            await _table.ExecuteAsync(TableOperation.InsertOrReplace(BuildEntity("test2", "test1"))).ConfigureAwait(false);

            await _table.ExecuteAsync(TableOperation.InsertOrReplace(BuildEntity("test2", "test2"))).ConfigureAwait(false);

            _query = new AzureTableQuery <TestEntity>(_table, null);
        }