Ich möchte ein Dokument in azure Dokumentdb mit einer Auto-Inkrement-Spalte erstellen.So erstellen Sie eine automatisch inkrementierte Spalte in Documentdb
Ist das möglich? Wenn ja, bitte führe mich.
Jede Hilfe würde sehr geschätzt werden.
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);
nicht genau, ich werde meine Frage bearbeiten :) –
mögliche Duplikate von [Haben wir Identity-Spalte in DocumentDB] (http://stackoverflow.com/questions/26701587/do-we-have-identity-column-in -documentdb) –
danke Abdel Raoof :) –