Example #1
0
 /// <summary>
 /// 初始所有表
 /// </summary>
 /// <param name="dbName"></param>
 /// <param name="tables"></param>
 public void InitTable(string dbName, List<string> tables)
 {
     var db = DataBase.Find(b => b.Name == dbName);
     if (db == null)
     {
         db = new DataBase() { Name = dbName };
         DataBase.Add(db);
     }
     var tableCache = new List<Table>();
     foreach (var item in tables)
     {
         tableCache.Add(new Table() { Name = item.ToLower() });
     }
     db.Tables = tableCache;
 }