Skip to content

Commit

Permalink
- 取消 Sqlite 默认使用 AdoPool;
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Aug 28, 2023
1 parent d7c9196 commit 1b7c578
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions FreeSql/FreeSqlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public partial class FreeSqlBuilder
bool _isLazyLoading = false;
bool _isExitAutoDisposePool = true;
bool _isQuoteSqlName = true;
bool? _isAdoConnectionPool = null;
bool _isAdoConnectionPool = false;
MappingPriorityType[] _mappingPriorityTypes;
NameConvertType _nameConvertType = NameConvertType.None;
Action<DbCommand> _aopCommandExecuting = null;
Expand Down Expand Up @@ -374,13 +374,9 @@ public IFreeSql<TMark> Build<TMark>()
default: throw new Exception(CoreStrings.NotSpecified_UseConnectionString_UseConnectionFactory);
}
}
var isAdoPool = false;
if (_isAdoConnectionPool != null) isAdoPool = _isAdoConnectionPool.Value;
else if (_dataType == DataType.Sqlite) isAdoPool = true; //sqlite 默认使用 Ado Pool
else isAdoPool = false;
ret = Activator.CreateInstance(type, new object[]
{
isAdoPool ? $"AdoConnectionPool,{_masterConnectionString}" : _masterConnectionString,
_isAdoConnectionPool ? $"AdoConnectionPool,{_masterConnectionString}" : _masterConnectionString,
_slaveConnectionString,
_connectionFactory
}) as IFreeSql<TMark>;
Expand Down

0 comments on commit 1b7c578

Please sign in to comment.