0
votes

I tried create collection of edges in c# via ArangoDB-NET driver (https://github.com/yojimbo87/ArangoDB-NET) and this code not working.. My code:

 var response = dbClient.Collection.Type(ACollectionType.Edge).KeyGeneratorType(AKeyGeneratorType.Autoincrement).WaitForSync(true).Create(
                "EdgesCollection");

dbClient is ADatabase object. Collection is created but document type is not edge. How can I do?

1
anyone help me? :<BeFine9

1 Answers

0
votes

I'm not familiar with that driver, and your question seems to be related to implementation, not DB functionality. However, my best guess would be to omit the KeyGeneratorType and WaitForSync options:

var cType = ACollectionType.Edge;
var cName = "EdgesCollection";
var response = dbClient.Collection.Type(cType).Create(cName);

If this fails to work, then you may need to review the docs, maybe add some other options like KeyIncrement. Generally, I would accept the defaults and only modify (or provide explicit parameters for) things that you NEED to change (i.e. "don't work").