Ejemplo n.º 1
0
        public static async Task CreateAllTables(IConfiguration configuration)
        {
            var account    = AzureTableExtensions.GetStorageAccount(configuration);
            var client     = account.CreateCloudTableClient();
            var tableNames = new[] { "Feed", "Post" };

            foreach (var tableName in tableNames)
            {
                await client.GetTableReference(tableName).CreateIfNotExistsAsync();
            }
        }
Ejemplo n.º 2
0
 public Posts(IConfiguration configuration)
 {
     account = AzureTableExtensions.GetStorageAccount(configuration);
     client  = account.CreateCloudTableClient();
     table   = client.GetTableReference <Post>();
 }