Examples for Azure Cosmos DB for Table SDK for .NET
APPLIES TO:
Table
The cosmos-db-table-api-dotnet-samples GitHub repository includes multiple sample projects. These projects illustrate how to perform common operations on Azure Cosmos DB for Table resources.
Prerequisites
- An Azure account with an active subscription. Create an account for free.
- Azure Cosmos DB for Table account. Create a API for Table account.
- .NET 6.0 or later
- Azure Command-Line Interface (CLI) or Azure PowerShell
Samples
The sample projects are all self-contained and are designed to be ran individually without any dependencies between projects.
Client
Task | API reference |
---|---|
Create a client with connection string | CosmosClient(string) |
Tables
Task | API reference |
---|---|
Create a table | TableClient.CreateIfNotExistsAsync |
Items
Task | API reference |
---|---|
Create an item using TableEntity | TableClient.AddEntityAsync<> |
Create an item using ITableEntity | TableClient.AddEntityAsync<> |
Point read an item | TableClient.GetEntityAsync<> |
Next steps
Dive deeper into the SDK to read data and manage your Azure Cosmos DB for Table resources.
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho