mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 优化 IAdo.ConnectionString 使用 UseConnectionFactory 时值为 NULL 的问题;
This commit is contained in:
@ -18,6 +18,7 @@ namespace FreeSql.Custom
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
var pool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.SqlServer, connectionFactory);
|
||||
ConnectionString = pool.TestConnection?.ConnectionString;
|
||||
MasterPool = pool;
|
||||
_CreateCommandConnection = pool.TestConnection;
|
||||
_CreateParameterCommand = CreateCommand();
|
||||
|
@ -20,6 +20,7 @@ namespace FreeSql.Custom.MySql
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
var pool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.SqlServer, connectionFactory);
|
||||
ConnectionString = pool.TestConnection?.ConnectionString;
|
||||
MasterPool = pool;
|
||||
return;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace FreeSql.Custom.Oracle
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
var pool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.SqlServer, connectionFactory);
|
||||
ConnectionString = pool.TestConnection?.ConnectionString;
|
||||
MasterPool = pool;
|
||||
using (var conn = pool.Get())
|
||||
UserId = CustomOracleAdo.GetUserId(conn.Value.ConnectionString);
|
||||
|
@ -21,6 +21,7 @@ namespace FreeSql.Custom.PostgreSQL
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
var pool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.SqlServer, connectionFactory);
|
||||
ConnectionString = pool.TestConnection?.ConnectionString;
|
||||
MasterPool = pool;
|
||||
return;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace FreeSql.Custom.SqlServer
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
var pool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.SqlServer, connectionFactory);
|
||||
ConnectionString = pool.TestConnection?.ConnectionString;
|
||||
MasterPool = pool;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user