public static AddEdgeCommand AddOut <TEdgeEntity>(this IWhereSelector selector, TEdgeEntity entity, string relation) { var addCommand = new AddEdgeCommand(selector.Client, entity, relation) { ParentSelector = selector, InsertCommand = new InsertCommand(selector.Client, entity) }; return(addCommand); }
public static AddEdgeCommand <TEdgeEntity> AddOut <TFromEntity, TEdgeEntity>(this Command <TFromEntity> command, TEdgeEntity entity, string relation) { var addCommand = new AddEdgeCommand <TEdgeEntity>(command.Client, entity, relation) { ParentCommand = command, InsertCommand = new InsertCommand(command.Client, entity) }; return(addCommand); }
public static AddEdgeCommand ConnectVerticies <TFromEntity, TToEntity>(this IGraphClient client, QueryResult <TFromEntity> fromEntity, TToEntity toEntity, string relation) { var fromSelector = new FromSelector <TFromEntity>(client); var whereSelector = new WhereAnySelector(client, "id", fromEntity.Id) { ParentSelector = fromSelector }; var addCommand = new AddEdgeCommand(client, toEntity, relation) { ParentSelector = whereSelector, InsertCommand = new InsertCommand(client, toEntity) }; return(addCommand); }