.NET SDK for Azure Cosmos DB for the core SQL API
Перейти к файлу
JamesHyot 6e2609f357 Added missing count increment causing Assert to never fail (#598) 2019-07-25 23:26:39 +05:30
.github/ISSUE_TEMPLATE Merged PR 187055: Use LFS for test json files and remove owners from tests 2019-02-13 20:40:19 +00:00
Microsoft.Azure.Cosmos Partition key validation on CreateContainerIfNotExistsAsync and code documentation update (#572) 2019-07-25 22:29:59 +05:30
Microsoft.Azure.Cosmos.Samples Added missing count increment causing Assert to never fail (#598) 2019-07-25 23:26:39 +05:30
Native Integrating master direct pacakge [BREAKING CHANGES] (#97) 2019-03-28 04:17:17 +05:30
.gitattributes Merged PR 189340: Remove twitter_data.json from git history 2019-03-01 02:43:21 +00:00
.gitignore Initial commit 2018-11-05 10:03:17 -08:00
CODEOWNERS Limiting kirll to soruce code 2019-03-07 18:27:02 +05:30
LICENSE Initial commit 2018-11-05 10:03:20 -08:00
Microsoft.Azure.Cosmos.sln Merged PR 176216: Moving Perf project to new repo 2019-01-03 21:04:12 +00:00
NuGet.config add source 2018-11-30 19:06:23 -08:00
PULL_REQUEST_TEMPLATE.md Adding a pull request template (#214) 2019-05-09 22:16:57 +05:30
README.md Updating change log (#521) 2019-07-17 19:18:30 +05:30
changelog.md Partition key validation on CreateContainerIfNotExistsAsync and code documentation update (#572) 2019-07-25 22:29:59 +05:30
repo.config Merged PR 178986: Config files required to onboard OneBranch Ownership Enforcer: repo.config and root directory owner. 2019-01-15 21:01:08 +00:00

README.md

Microsoft Azure Cosmos DB .NET SDK Version 3.0

This client library enables client applications to connect to Azure Cosmos via the SQL API. Azure Cosmos is a globally distributed, multi-model database service. For more information, refer to https://azure.microsoft.com/services/cosmos-db/.

CosmosClient client = new CosmosClient("https://mycosmosaccount.documents.azure.com:443/", "mysupersecretkey");
Database database = await client.CreateDatabaseIfNotExistsAsync("MyDatabaseName");
Container container = await database.CreateContainerIfNotExistsAsync(
    "MyContainerName",
    "/partitionKeyPath",
    400);

dynamic testItem = new { id = "MyTestItemId", partitionKeyPath = "MyTestPkValue", details = "it's working" };
ItemResponse<dynamic> response = await container.CreateItemAsync(testItem);

Install via Nuget.org

Install-Package Microsoft.Azure.Cosmos

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.