使用C#在COSMOS DB上进行CURD操作 [英] CURD operations on COSMOS DB using C#
本文介绍了使用C#在COSMOS DB上进行CURD操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在COSMOS DB上执行CURD操作?我是否总是需要知道数据库和集合名称才能执行任何CURD操作?
我无法编写通用代码来对类似于SQL数据库的COSMOS DB执行CURD操作.
解决方案
嗨Kishore,
请查看以下文档: 解决方案
Hi Kishore,
Please take a look at the following documentation: Azure Cosmos DB: .NET examples for the SQL API
The documentation includes a section on document examples that show CRUD transactions with a C# client. There are other examples that you may find worth your time
You will always need to use a specific database name and a collection ID but if you have a fixed partition, you will not need to pass a partition key.
Ecommerce is the Database Name
Customers is the collection ID
My collection is fixed, with no partition key.
这篇关于使用C#在COSMOS DB上进行CURD操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文