Using Azure Search with C#

1 hour
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, you will gain experience using C#, the Azure Search SDK, and Visual Studio to connect to and use Azure Search.

You will use RDP to connect to a Windows VM and update a pre-built Visual Studio solution with the appropriate C# code to connect to your search service, create a search index, index sample JSON data, and search your index. When you’re finished, you will run the console application to see everything working. Finally, you will verify documents are indexed using the Azure Portal.

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

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

RDP into the VM and open the VS 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 = "https://github.com/linuxacademy/content-azure-labs/blob/master/zips/azure-search.zip?raw=true"
$zipfile = "C:UsersazureuserDesktopazure-search.zip"
$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 Azure Search.

When we’re finished, we’ll run our completed console app to create an index, index sample JSON data, and search the index.

We’ll also verify the data was indexed using the Azure Portal.

Additional Resources

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

To do this, you will use RDP to connect to a Windows VM and update a pre-built Visual Studio solution with the appropriate C# code to connect to your Search service, create a search index, index sample JSON data, and search your index. When you're finished, you will run the console application to see everything working. Finally, you will verify documents are indexed using the Azure Portal.

The activity gives step-by-step instructions for this lab. Follow along with them and you will successfully connect to and interact with Azure Search.

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.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

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