mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 12:03:21 +08:00
debug #183
This commit is contained in:
parent
c89e4f9b20
commit
668b5e580d
@ -19,10 +19,8 @@ namespace FreeSql.Sqlite
|
|||||||
if (connectionFactory != null)
|
if (connectionFactory != null)
|
||||||
{
|
{
|
||||||
MasterPool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.Sqlite, connectionFactory);
|
MasterPool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.Sqlite, connectionFactory);
|
||||||
using (var conn = MasterPool.Get())
|
_CreateCommandConnection = MasterPool.Get().Value;
|
||||||
{
|
_CreateCommandConnection.Close();
|
||||||
_CreateCommandConnection = conn.Value;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(masterConnectionString))
|
if (!string.IsNullOrEmpty(masterConnectionString))
|
||||||
@ -65,7 +63,12 @@ namespace FreeSql.Sqlite
|
|||||||
DbConnection _CreateCommandConnection;
|
DbConnection _CreateCommandConnection;
|
||||||
protected override DbCommand CreateCommand()
|
protected override DbCommand CreateCommand()
|
||||||
{
|
{
|
||||||
if (_CreateCommandConnection != null) return _CreateCommandConnection.CreateCommand();
|
if (_CreateCommandConnection != null)
|
||||||
|
{
|
||||||
|
var cmd = _CreateCommandConnection.CreateCommand();
|
||||||
|
cmd.Connection = null;
|
||||||
|
return cmd;
|
||||||
|
}
|
||||||
return new SQLiteCommand();
|
return new SQLiteCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user