From 7ba26d23ef3576a89ce4b9da54d46846a65f5979 Mon Sep 17 00:00:00 2001 From: Ievlev Yegor Date: Tue, 24 Sep 2024 01:38:23 +0300 Subject: [PATCH] tryhardim... --- hello_world/Program.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 hello_world/Program.cs diff --git a/hello_world/Program.cs b/hello_world/Program.cs new file mode 100644 index 0000000..200d045 --- /dev/null +++ b/hello_world/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.IO.Pipes; +using System.Reflection.Metadata; +using Core.Arango; +using Core.Arango.Protocol; + + +// from connection string +var arango = new ArangoContext("Server=https://2b71327f1e85.arangodb.cloud:8529;Realm=opa;User=root;Password=njeYmNHT491eDWhbf6oO;"); + +await arango.Database.CreateAsync("database"); + +await arango.Collection.CreateAsync("database", "collection", ArangoCollectionType.Document); + + +var key = "1"; +await arango.Document.CreateAsync("database", "collection", new +{ + Key = key, + SomeValue = "Hello World!" +}); + +var list1 = await arango.Document.GetManyAsync("database", "collection", new List { + "1" +}); + +Console.WriteLine($"{list1[0]}"); \ No newline at end of file