How to Use C# Azure.Data.Tables SDK with Azure Cosmos DB

Last month, the Azure SDK team released a new library for Azure Tables for .NET, Java, JS/TS, and Python. This release brings the Table SDK in line with other Azure SDKs and they use the specific Azure Core packages for handling requests, errors and credentials.

Azure Cosmos DB provides a Table API offering that is essentially Azure Table Storage on steroids! If you need a globally distributed table storage service, Azure Cosmos DB should be your go-to choice.

If you’re making a choice between Azure Cosmos DB Table API and regular Azure Table Storage, I’d recommend reading this article.

In this article, I’ll show you how we can perform simple operations against a Azure Cosmos DB Table API account using the new Azure.Data.Table C## SDK.

Specifically, we’ll go over:

  • Installing the SDK 💻
  • Connecting to our Table Client and Creating a table 🔨
  • Defining our entity 🧾
  • Adding an entity ➕
  • Performing Transactional Batch Operations 💰
  • Querying our Table ❓
  • Deleting an entity ❌
  • Let’s dive into it!

#Installing the SDK 💻

#Connecting to our Table Client and Creating a table 🔨

#Defining our entity 🧾

#Adding an entity ➕

#Performing Transactional Batch Operations 💰

#Querying our Table ❓

#Deleting an entity ❌

#azure #csharp #azure-cosmos-db #programming #tutorial #tables sdk

How to Use C# Azure.Data.Tables SDK with Azure Cosmos DB