Example #1
0
        public static void Execute()
        {
            var databaseState = SQLiteConnector.Connect(@"Cidades.sqlite3");

            switch (databaseState)
            {
            case SQLiteConnector.DatabaseState.Invalid:
                return;

            case SQLiteConnector.DatabaseState.Empty:
                DatabaseManager.CreateTables();
                break;
            }

            if (DatabaseVersion > SQLiteConnector.Connection.ExecuteScalar <int>("SELECT Version FROM Config"))
            {
                DatabaseManager.UpdateTables();
            }

            ConsultasSimples();
            ConsultasCompletas();
        }