Skip to content

Commit

Permalink
debug #183
Browse files Browse the repository at this point in the history
  • Loading branch information
28810 authored and 28810 committed Jan 19, 2020
1 parent c89e4f9 commit 668b5e5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Providers/FreeSql.Provider.Sqlite/SqliteAdo/SqliteAdo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ public SqliteAdo(CommonUtils util, string masterConnectionString, string[] slave
if (connectionFactory != null)
{
MasterPool = new FreeSql.Internal.CommonProvider.DbConnectionPool(DataType.Sqlite, connectionFactory);
using (var conn = MasterPool.Get())
{
_CreateCommandConnection = conn.Value;
}
_CreateCommandConnection = MasterPool.Get().Value;
_CreateCommandConnection.Close();
return;
}
if (!string.IsNullOrEmpty(masterConnectionString))
Expand Down Expand Up @@ -65,7 +63,12 @@ public override object AddslashesProcessParam(object param, Type mapType, Column
DbConnection _CreateCommandConnection;
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();
}

Expand Down

0 comments on commit 668b5e5

Please sign in to comment.