/// <summary> /// Booleen si la base ne possède aucune tables /// </summary> /// <returns></returns> public override bool isDBEmpty() { bool empty = true; //------------------------------------ //SMO Server object setup with SQLConnection. Server server2 = new Server(new ServerConnection((SqlConnection)Connection)); string dbName2 = Connection.Database.ToString(); //Set Database to the newly created database Database db2 = server2.Databases[dbName2]; try { if (db2.Tables.Count != 0) { empty = false; } } catch (NullReferenceException) { InfoLogger.Fatal("La base de destination n'existe pas!"); empty = false; } //------------------------------------ Connection.Close(); return(empty); }