public async Task Where_property_array_contains_element() { await _g .V <Company>() .Where(t => t.PhoneNumbers.Contains("+4912345")) .ToArrayAsync(); }
public async Task CreateGraph() { // Uncomment to delete the whole graph on every run. //await _g.V().Drop().ToArray(); _marko = await _g .AddV(new Person { Name = "Marko", Age = 29 }) .FirstAsync(); Debug.Assert( _marko.Name != null, "The json payload returned from the server did not include any vertex properties." + "If you are running Gremlin Server >= 3.4.0, see the note above and try uncommenting 'RemoveStrategies'. "); var vadas = await _g .AddV(new Person { Name = "Vadas", Age = 27 }) .FirstAsync(); var josh = await _g .AddV(new Person { Name = "Josh", Age = 32 }) .FirstAsync(); var peter = await _g .AddV(new Person { Name = "Peter", Age = 29 }) .FirstAsync(); var charlie = await _g .AddV(new Dog { Name = "Charlie", Age = 2 }) .FirstAsync(); var luna = await _g .AddV(new Cat { Name = "Luna", Age = 9 }) .FirstAsync(); var lop = await _g .AddV(new Software { Name = "Lop", Language = ProgrammingLanguage.Java }) .FirstAsync(); var ripple = await _g .AddV(new Software { Name = "Ripple", Language = ProgrammingLanguage.Java }) .FirstAsync(); await _g .V(_marko.Id) .AddE <Knows>() .To(__ => __ .V(vadas.Id)) .FirstAsync(); await _g .V(_marko.Id) .AddE <Knows>() .To(__ => __ .V(josh.Id)) .FirstAsync(); await _g .V(_marko.Id) .AddE <Created>() .To(__ => __ .V(lop.Id)) .FirstAsync(); await _g .V(josh.Id) .AddE <Created>() .To(__ => __ .V(ripple.Id)) .FirstAsync(); await _g .V(josh.Id) .AddE <Created>() .To(__ => __ .V(lop.Id)) .FirstAsync(); await _g .V(peter.Id) .AddE <Created>() .To(__ => __ .V(lop.Id)) .FirstAsync(); await _g .V(josh.Id) .AddE <Owns>() .To(__ => __ .V(charlie.Id)) .FirstAsync(); await _g .V(peter.Id) .AddE <Owns>() .To(__ => __ .V(luna.Id)) .FirstAsync(); }