Using Azure Storage Tables with C#

1 hour
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, you will gain experience using C# and Visual Studio to connect to and use Table storage.

You will RDP into a Windows VM that is set up with Visual Studio, and update a pre-built solution with the appropriate Table storage C# code. We will then use this code to connect to Table storage, upload Table Entities individually or in batches, and retrieve Table Entities by partition and row keys or by using Table Queries. Finally, you will run a console application to see everything working.

Upon completion of the lab, you will have gained the experience required to work with Table storage using C#.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

RDP into the VM and open the Visual Studio solution.

RDP login:

  UserName : "azureuser"
  Password : "LA!2018!Lab"

PowerShell to run:

Add-Type -Path "C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.5System.IO.Compression.FileSystem.dll"

$url = ""
$zipfile = ""
$folder = "C:UsersazureuserDesktop"

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -UseBasicParsing -OutFile $zipfile $url 

[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $folder)

Remove-Item -Path $zipfile 
Update Visual Studio solution and run the console app.

In this step, we’ll update our Visual Studio solution with the appropriate C# code to connect to and interact with the Table service.

When we’re finished, we’ll run our completed console app to save and retrieve Table Entities.

Additional Resources

As a developer, you want to use the Azure Storage Table SDK and C# code to connect to and interact with the Azure Table service.

To do this, you will RDP into a virtual machine in Azure, download a pre-built solution, and fill in the correct C# code to get the program to compile. When you run the program, it will save and retrieve tables from the Azure Table service.

You are given step-by-step instructions over the activity tasks for this lab. Follow along with those, and you will have successfully connected to and interacted with the Azure Table service.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?