/// <summary> /// 获取关系型数据库连接测试实例 /// </summary> /// <param name="connectionOptions">数据源连接配置</param> /// <param name="providerName">数据源提供程序</param> /// <returns>关系型数据库连接测试实例</returns> public static RdbmsConnectTest ConnectionTest(ConnectionOptions connectionOptions, string providerName) { var storage = new StorageManager(connectionOptions, providerName); return(new RdbmsConnectTest(storage.GetDbConnection())); }
/// <summary> /// 获取关系型数据库连接测试实例 /// </summary> /// <param name="connectionName">App.Config / Web.Config 文件中的 ConnectionStrings 连接名</param> /// <returns>关系型数据库连接测试实例</returns> public static RdbmsConnectTest ConnectionTest(string connectionName) { var storage = new StorageManager(connectionName); return(new RdbmsConnectTest(storage.GetDbConnection())); }