コード例 #1
0
ファイル: Database.cs プロジェクト: kouweizhong/sqlcecodegen
        private void AnalyzeDatabase(string connectionString)
        {
            // Read schema information
            var engine = new SqlCeEngine(connectionString);
            var tables = engine.GetTables();

            if (tables == null)
            {
                return;
            }

            // Retrieve table information
            var tableList = GetTableInformation(connectionString, tables);

            // Analyze table information (columns and data type)
            AnalyzeTables(tableList, connectionString);
        }
コード例 #2
0
        public void AnalyzeDatabase()
        {
            var engine = new SqlCeEngine(ConnectionString);
            var tables = engine.GetTables();

            if (tables == null)
            {
                return;
            }

            var tableList = GetTableInformation(ConnectionString, tables);

            Tables = new List <Table>(tableList.Values);
            FetchPrimaryKeys();
            FetchIndexes();
            FetchReferences();
            FetchReferencedBy();
        }