/// <summary> ///选择数据库 /// </summary> /// <param name="db"></param> public void DBListSelectChange(DBShow db) { if (db == null) { return; } if (!DBRazorDic.ContainsKey(db.DBName)) { EasyCodeGenerator.DbModel dbRazor = new EasyCodeGenerator.DbModel(); dbRazor.LoadDBSchema(db.DBName, db.connString); DBRazorDic.Add(db.DBName, dbRazor); } CurrentDBModel = DBRazorDic[db.DBName]; }
/// <summary> /// 获取所有的db /// </summary> /// <returns></returns> public List <DBShow> GetAllDB() { List <DBShow> L1 = new List <DBShow>(); var v1 = EasyCodeGenerator.DbModel.GetDBConnString(); foreach (var item in v1) { DBShow d = new DBShow() { DBName = item.Key, connString = item.Value }; L1.Add(d); } DBList = L1; return(L1); }