Skip to content

Instantly share code, notes, and snippets.

@gbellmann
Created April 13, 2015 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbellmann/7aecaba91d0dfd4855a9 to your computer and use it in GitHub Desktop.
Save gbellmann/7aecaba91d0dfd4855a9 to your computer and use it in GitHub Desktop.
Function to create an Azure Table, called "orders", if it doesn't exist
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
public CloudTable CreateTable(CloudStorageAccount storageAccount)
{
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable table = tableClient.GetTableReference("orders");
table.CreateIfNotExists();
return table;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment