First, we need to load up LINQPad (I’m using V5) and creation a new connection. We will use the Azure Storage Driver for this.
Then we will enter the required credentials in order to create the connection with our storage account.
Once we’ve completed this process we can easily run C# expressions again our table using LINQ syntax. Let’s look at a few examples.
Viewing all entries:
Viewing a specific entry by a simple where criteria:
Now if we wanted to do something more complex, say delete all of the entries in a table or just a specific set of entries then we need to expand our process a bit. We can use the language type of “C# program” to build an actual C# program in LINQPad.
First, for this to work we need to add some DLL and Namespace references using the query properties.
Once we’ve added these references we can write a simple void Main() program and pretend like we are working with the table in C#.
In this example we are creating a storage account variable by using the CloudStorageAccount.Parse command to parse the connection string that Azure gives us.
Then we create a table client, pull in our table, and query it for all the entries with a specific partition key.
Finally, we run all the discovered queries through a loop and delete them.
Deleting an entry using a C# program layout:
Keep in mind this is a very simple example and does not take into account batches, continuation tokens, or any sort of API limits (of which there are a few you should be aware of).
Hope this helps get you started!