【发布时间】:2015-02-26 07:00:41
【问题描述】:
我想在 azure documentdb 中创建一个带有自动增量列的文档。
这可能吗?如果是,请指导我。
任何帮助将不胜感激。
Database db = CreateOrReadDocumentDb("EmployeeDb").Result;
DocumentCollection dc = CreateOrReadDocumentCollection(db.SelfLink, "EmployeeDetails").Result;
Employee emp = new Employee();
emp.Name="ABC";
emp.id="";//automatically generate a unique string
emp.sal=10000;
emp.exp =5;
emp.index=0; // I want an auto increment column for emp with name index and want to store in azure document db
client.CreateDocumentAsync(collectionLink, data);
【问题讨论】:
-
不完全是,我会编辑我的问题:)
-
感谢 Abdel Raoof :)
标签: c# auto-increment azure-cosmosdb