If I want to connect to CosmosDB which is created with Gemlin API is works fine with Gremlin.Net
But the Gremlin.NET API is designed to handle on Graph. I think because the Neo4j and other Graph databases can handle one graph in one time. And I want a new a Graph in CosmosDB I can create it from Azure portal.
But How can I create a new Graph from Code? Of course when I connect to same CosmosDB instance with DocumentDB API, then I Can create a new Collection which is Graph in Cosmos. But this is not safe for some reason:
- Not recommended to Connect to Cosmos with Different API-s.
- When I create a Graph from Azure Portal, maybe there is some other initialization code is running, other than just create an empty collection
Is there a safe way to create Graph In CosmosDB from Code?