Exemple #1
0
        public async static Task <GremlinDao> BuildGremlinDao()
        {
            var gremlinDao = new GremlinDao();

            gremlinDao.database = await client.CreateDatabaseIfNotExistsAsync(new Database { Id = "roomies" });

            gremlinDao.graph = await client.CreateDocumentCollectionIfNotExistsAsync(UriFactory.CreateDatabaseUri("roomies"), new DocumentCollection { Id = "Collection1" }, new RequestOptions { OfferThroughput = 1000 });

            return(gremlinDao);
        }
Exemple #2
0
        public static async Task RunAsyncAgain()
        {
            var gremlinDao = await GremlinDao.BuildGremlinDao();

            var billStrings = await gremlinDao.GetObjectJsonStringsByLabel("bill");

            // Console.WriteLine(string.Join("\n\n", billStrings));

            var billObj = await gremlinDao.GetObjectByLabel <Bill>("bill");

            Console.WriteLine(billObj.FirstOrDefault().OwedParty);
        }