To add entries to a table, you should create objects based on the TableEntity based class and serialize them into the table using the Storage Client Library. The following properties are provided for you in this base class,
- Partition Key: Used to partition data across storage infrastructure
- Row Key: Unique identifier in a partition
- Timestamp: Time of the last update maintained by Azure Storage
- ETag: Used internally to provide optimistic concurrency
- Creating Storage Account and Table - Understanding Table Storage - Part One
- Retrieving Records -Understanding Table Storage - Part Three
- Updating Records -Understanding Table Storage - Part Four
- Batch Table Operations-Understanding Table Storage - Part Five
- Deleting Records -Understanding Table Storage - Part Six
Step 1
Open your project in Visual Studio and create a new class named Customers inside a newly created folder called Entities.
Right-click your project in solution explorer - Add - New Folder
Right Click on newly created folder - Add - New Item - Select class - Name the class as Customers.cs - Click on Add
Step 2
In the newly created class Customers.cs replaces the existing code with the following code. Make sure you are using the same name for your project, else change it accordingly.
The custom class you care reating here should be derived from the TableEntity class which lies under Microsoft.WindowsAzure.Storagetable namespace. Here we are just building the properties for this class and creating a constructor for it. We are setting the Partition-key as the type of the customer so that it stores all these records on the same storage node on the backend and the Row-key which needs to be unique within a partition as the email.


Hadshana KamalanathanPosted Jul 14, 2018, 11:42 PM
Thank you for sharing...