/// <summary> /// Adds the "addV()" step to the traversal, creating a new vertex in the graph. /// </summary> /// <typeparam name="TVertex">The type of the vertex.</typeparam> /// <param name="graphTraversalSource">The graph traversal source.</param> /// <returns>Returns the resulting traversal</returns> public static ISchemaBoundTraversal <object, TVertex> AddV <TVertex>(this IGraphTraversalSource graphTraversalSource) where TVertex : VertexBase { var label = LabelNameResolver.GetLabelName(typeof(TVertex)); return(graphTraversalSource.AddV(label).AsSchemaBound <object, TVertex>()); }
/// <summary> /// Adds the "addV()" step to the traversal, creating a new vertex in the graph. /// </summary> /// <typeparam name="TVertex">The type of the vertex.</typeparam> /// <param name="graphTraversalSource">The graph traversal source.</param> /// <param name="vertex">The vertex to add.</param> /// <param name="serializationSettings">The serialization settings.</param> /// <returns>Returns the resulting traversal</returns> public static ISchemaBoundTraversal <object, TVertex> AddV <TVertex>(this IGraphTraversalSource graphTraversalSource, TVertex vertex, JsonSerializerSettings serializationSettings) where TVertex : VertexBase { var label = LabelNameResolver.GetLabelName(typeof(TVertex)); var traversal = graphTraversalSource.AddV(label); traversal = TraversalHelper.AddObjectProperties(traversal, vertex, serializationSettings); return(traversal.AsSchemaBound <object, TVertex>()); }