I am studying gremlin. I need to connect gremlin to .net and below is my code:
internal class Program
{
private const string Host = "localhost";
private const int Port = 8182;
private const string NameTraversalSource = "gmodern";
[Obsolete]
private static void Main(string[] args)
{
Console.WriteLine("Start");
Graph graph = new Graph();
var client = new GremlinClient(new GremlinServer(Host, Port));
var g = graph.Traversal().WithRemote(new DriverRemoteConnection(client));
g.AddV("person").Property("name", "marko");
var re = g.V().HasLabel("person").Values<string>("name").ToList();
foreach (var c in re)
{
Console.WriteLine(c);
}
Console.WriteLine("End");
Console.ReadKey();
}
}
I don't know why it doesn't answer the desired result. I added vertex and name property with value of "marko". I need to print it out. But it doesn't print. Why? Help me.