public async Task Up(IArangoMigrator migrator, ArangoHandle handle) { await migrator.ApplyStructureAsync(handle, new ArangoStructure { Collections = new List<ArangoCollectionIndices> { new ArangoCollectionIndices { Collection = new ArangoCollection { Name = "Vertices", Type = ArangoCollectionType.Document } }, new ArangoCollectionIndices { Collection = new ArangoCollection { Name = "Edges", Type = ArangoCollectionType.Edge } } } }); }
public async Task Up(IArangoMigrator migrator, ArangoHandle handle) { await migrator.ApplyStructureAsync(handle, new ArangoStructure { Graphs = new List <ArangoGraph> { new ArangoGraph { Name = "Graph", EdgeDefinitions = new List <ArangoEdgeDefinition> { new ArangoEdgeDefinition { Collection = "Edges", From = new List <string> { "Vertices" }, To = new List <string> { "Vertices" } } } } } }); await migrator.Context.Graph.Vertex.CreateAsync(handle, "Graph", "Vertices", new { Key = "alice" }); await migrator.Context.Graph.Vertex.CreateAsync(handle, "Graph", "Vertices", new { Key = "bob" }); await migrator.Context.Graph.Edge.CreateAsync(handle, "Graph", "Edges", new { Key = "alicebob", From = "Vertices/alice", To = "Vertices/bob" }); }