From the course: ASP.NET Core: Working with Azure Tables

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Retrieve a single entity from Azure Table storage

Solution: Retrieve a single entity from Azure Table storage - ASP.NET Core Tutorial

From the course: ASP.NET Core: Working with Azure Tables

Start my 1-month free trial

Solution: Retrieve a single entity from Azure Table storage

(upbeat music) - [Instructor] So I asked you to retrieve a single entity from an Azure table. Now let us walk through my solution together. For that, let's go to Visual Studio. In here go to the operations.cs file. Then scroll down to the last method. I'll just copy this method and then just paste it down here. Change the name from RetrieveAll to RetrieveSingleDataOperation. And we said that it takes two parameters. The first parameter is going to be the partitionKey. And the second parameter is going to be the rowKey. Now next we said that we need to create the table operation. So the operation for retrieving this data. For that I'll just type TableOperation. So the name is going to be retrieveSingleOperation is equal to TableOperation .Retrieve. Then in here we define that we are expecting as a response, an EmployeeEntity. And then pass as a parameter the partitionKey, and also the rowKey. So in here we…

Contents