예제 #1
0
        public async Task Index()
        {
            var settings = ConnectionSettings.CreateBasicAuth(Neo4JClient.uri, Neo4JClient.user, Neo4JClient.password);

            using (var client = new Neo4JClient(settings))
            {
                await client.CreateIndices();
            }
        }
예제 #2
0
        public static void Main(string[] args)
        {
            var settings = ConnectionSettings.CreateBasicAuth("bolt://localhost:7687/db/flights", "neo4j", "test_pwd");

            using (var client = new Neo4JClient(settings))
            {
                // Create Indices for faster Lookups:
                client.CreateIndices();
                // Insert the Base Data (Airports, Carriers, ...):
                InsertBaseData(client);
                // Insert the Flight Data:
                InsertFlightData(client);
            }
        }
예제 #3
0
        public static async Task RunAsync(IMovieDataService service)
        {
            var settings = ConnectionSettings.CreateBasicAuth("bolt://localhost:7687/db/actors", "neo4j", "test_pwd");

            using (var client = new Neo4JClient(settings))
            {
                // Create Indices for faster Lookups:
                await client.CreateIndices();

                // Create Base Data:
                await client.CreateMovies(service.Movies);

                await client.CreatePersons(service.Persons);

                await client.CreateGenres(service.Genres);

                // Create Relationships:
                await client.CreateRelationships(service.Metadatas);
            }
        }