private DbModels GetEmptyDbModel(DBDataSourceType sourceType) { DbModels rel = new DbModels(); if (sourceType == DBDataSourceType.Empty) { rel.DbModel = new DBSetting() { DbName = "NULL", SchemaName = "NULL" }; rel.Functions = new Dictionary <string, Function>(); rel.Procs = new Dictionary <string, Function>(); rel.Tables = new Dictionary <string, TableInfo>(); rel.Triggers = new Dictionary <string, Trigger>(); rel.Views = new Dictionary <string, ViewInfo>(); } return(rel); }
/// <summary> /// 功能:创建数据源实例 /// </summary> /// <param name="dbType">数据源类型</param> /// <returns>数据源实例</returns> public static IDBDataSource CreateDataSource(DBDataSourceType dbType) { return(ObjectFactoryHelper.CreateInstance <IDBDataSource>(dbType + "DBDataSource", "DBDataSource", true)); }