Get Started With Azure Storage And Console Application For Tables

In this article you will learn how to get started with Azure storage and console application for tables.

Introduction

This article is about Azure Storage and working on Tables in the Azure Storage application using Visual Studio.

Here I will be talking about tables on Azure Storage, developing a Windows Console application in Visual Studio, and adding client libraries to it.

Tools needed to go with this demo:

  1. Microsoft Azure account – check with the Microsoft azure website to get a free account.
  2. Visual Studio 2015 installed on your laptop.
  3. Azure SDK for .NET installed on your Visual Studio.
  4. Azure Configuration Manager for .NET.
  5. .NET Framework installed on your laptop.

Table Storage in Microsoft Azure (In short)

The table storage in Microsoft Azure is used to store the NoSQL unstructured data in the cloud. Table storage helps us in adopting the data we need in our application because it is schema-less. Table storage in the Microsoft Azure also costs less, even when you work with large volumes of data.

Table Service Components

The table service components are arranged with the components as shown below,



The table holds a storage account with a name and a table in which contains data about a particular stream and that has been connected towards the entity.

Creating an Azure Storage Account

Azure Storage account can be created with multiple gateways such as Powershell, Azure Portal, Visual Studio, etc., but here we will be using Microsoft Azure Portal to do it.

Step 1

Go for Microsoft Azure Portal using the link

Sign in with your Microsoft Azure account in the below window,



The Azure portal home page will be loaded as shown below,



Step 2

Click on New, Storage and Storage Account in this portal.



Step 3

Create a storage account by filling the below details in your Azure Portal. This storage account will cost you from the subscription that you have.



This will take you to the deployment process for your storage account after you click on Create. You will be getting a notification as shown:



Now the Microsoft Azure account has been initiated with a storage account.



The Windows Console Application that we will be developing here can be run with two environments. They are,

  1. By running the code against an Azure Storage account in the cloud.
  2. By running the code against the Azure Storage emulator.

Creating a Console Application in Visual Studio

Step 4

You will be creating a console application in Visual Studio now in which we will be configuring the Microsoft Azure Storage account.

Run Visual Studio 2015 in your laptop now and click on New Project here.



Step 5

Go for Installed - Templates - Visual C# - Windows and Console Application under Visual C#.

Name your project here, select the location and click on OK to create it.



And now the Console Application project has been created.



Step 6

You should add NuGet packages here to the Windows Console Application that has been created.

Right Click on your Solution name in Solution Explorer and go for Manage NuGet Packages.



Go for Browse and search for WindowsAzure.Storage. click on it and install the WindowsAzure.Storage client library.



Click on Install to Install the Client Library.



Click on “I accept” to agree for the License agreement and add the Client Library.



This notification on the output pane shows that the Azure Storage Client Library has been installed in your Solution file.





Step 7

Now add the Client Library for Configuration Manager using the same Manage NuGet package under Solution Explorer.

Again Right Click on Solution Name of your Project and go for Manage NuGet Packages.



Go for Browse and search for Configuration Manager and Click on Install by selecting

Microsoft.WindowsAzure.ConfigurationManager as shown below,



Click on I accept for the license agreement and the Client Library of Microsoft Windows Azure Configuration Manager as shown below.



This Output notification pane shows that the Client Library has been added for the Solution File on the Solution Explorer.




Keynotes in Short

  1. About Azure Tables.
  2. Components of Azure Tables.
  3. Creating a Storage account in Microsoft Azure.
  4. Creating a Windows Console Application in Microsoft Visual Studio 2015.
  5. Adding Client Libraries of Azure Storage and Configuration Manager in Windows Console Application.

Note

My next writing will be a continuation of this one where I will be configuring my Azure Storage account in this application using Connection String and will be working on Tables in Storage.