Beispiel #1
0
        /// <summary>
        /// Check if database exist
        /// </summary>
        /// <param name="name">database name</param>
        public bool DatabaseExist(string name)
        {
            name.ThrowIfNullOrEmpty("name");
            IListDatabaseResponse response = ListDatabase();

            return
                (response.Databases.Any(
                     database => String.Equals(database, name, StringComparison.CurrentCultureIgnoreCase)));
        }
        public void ListDatabasesTest()
        {
            var configuration = new ConnectionConfiguration(new Uri("http://localhost:2480"));

            configuration.SetBasicAuthentication("root", "F3647CD476BD50D14892033CF160E748038BD62DDB7292690086B5F52151B7C0");

            var orientdbClient             = new OrientdbClient(configuration);
            IListDatabaseResponse response = orientdbClient.ListDatabase();

            Assert.IsNotNull(response);
        }