8c4f99f35e
* Infrastructure for performance testing with ODE pipeline. * Resolve comments * Removed randomization from data creation process * Fixed comments * Removed Query and EnableODE from QueryStatisticsMetrics, as they do not relate to query statistics. * Removed try catch to make CreateItemAsync call always succeed * Removed one liner functions * Removed code from MetricsSerializer and QueryStatisticsDatumVisitor files * Fixed comments * Removed request Charge check * Bug in Debug Assert * Test * Bug in debug assert fix * Fixed second bug in Metrics Accumalator class * Added ignore flag to ode perf tests so that they do not run on every loop build * Added comment explaining the Ignore flag. |
||
---|---|---|
.github | ||
Microsoft.Azure.Cosmos | ||
Microsoft.Azure.Cosmos.Encryption | ||
Microsoft.Azure.Cosmos.Encryption.Custom | ||
Microsoft.Azure.Cosmos.Samples | ||
docs | ||
templates | ||
.editorconfig | ||
.gitattribute | ||
.gitignore | ||
.sscignore | ||
35MSSharedLib1024.snk | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
CredScanSuppressions.json | ||
Directory.Build.props | ||
Exceptions.md | ||
LICENSE | ||
Microsoft.Azure.Cosmos.sln | ||
PULL_REQUEST_TEMPLATE.md | ||
README.md | ||
SECURITY.md | ||
SdkDesignGuidelines.md | ||
ThirdPartyNotice.txt | ||
UpdateContracts.ps1 | ||
UpdateDotNetVersion.ps1 | ||
azure-pipelines-cron.yml | ||
azure-pipelines-ctl-publishing.yml | ||
azure-pipelines-encryption-custom.yml | ||
azure-pipelines-encryption.yml | ||
azure-pipelines-functional.yml | ||
azure-pipelines-nightly.yml | ||
azure-pipelines-official.yml | ||
azure-pipelines.yml | ||
changelog.md | ||
repo.config | ||
testkey.snk |
README.md
Microsoft Azure Cosmos DB .NET SDK Version 3
This client library enables client applications to connect to Azure Cosmos DB for NoSQL. Azure Cosmos DB 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);
// Create an item
dynamic testItem = new { id = "MyTestItemId", partitionKeyPath = "MyTestPkValue", details = "it's working", status = "done" };
ItemResponse<dynamic> createResponse = await container.CreateItemAsync(testItem);
// Query for an item
using (FeedIterator<dynamic> feedIterator = container.GetItemQueryIterator<dynamic>(
"select * from T where T.status = 'done'"))
{
while (feedIterator.HasMoreResults)
{
FeedResponse<dynamic> response = await feedIterator.ReadNextAsync();
foreach (var item in response)
{
Console.WriteLine(item);
}
}
}
Install via Nuget.org
Install-Package Microsoft.Azure.Cosmos
Useful links
- Get Started APP
- GitHub samples
- SDK Best practices
- MultiMaster samples
- Resource Model of Azure Cosmos DB Service
- Cosmos DB Resource URI
- Partitioning
- Introduction to Azure Cosmos DB for NoSQL queries
- SDK API
- Using emulator
- Capture traces
- Release notes
- Diagnose and troubleshooting
Microsoft Open Source Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct.
Resources:
- Microsoft Open Source Code of Conduct
- Microsoft Code of Conduct FAQ
- Contact opencode@microsoft.com with questions or concerns
Contributing
For details on contributing to this repository, see the contributing guide.
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.