FreeSql icon indicating copy to clipboard operation
FreeSql copied to clipboard

UseAdoConnectionPool 默认为 true

Open hatulaile opened this issue 9 months ago • 2 comments

问题描述及重现代码:

注释显示 UseAdoConnectionPool 不设置时默认为 false, 实际默认会为 true.

var freesql = new FreeSqlBuilder().UseConnectionString(DataType.MySql, "Server=127.0.0.1;Port=3306;Database=mydb;Uid=root;Pwd=password;").Build();
Type type = freesql.Ado.MasterPool.GetType();
Console.WriteLine(type.FullName);

这里会输出 FreeSql.Internal.CommonProvider.DbConnectionStringPool 而不是 FreeSql.MySql.MySqlConnectionPool

数据库版本

mysql 8.0.31

安装的Nuget包

FreeSql 3.5.305
FreeSql.Provider.MySqlConnector 3.5.305
MySqlConnector 2.5.0

.net framework/. net core? 及具体版本

.NET Framework 4.8 与 .NET 10 都有这个问题

hatulaile avatar Feb 15 '26 05:02 hatulaile

为了降低解释成本,这个行为在一年前已经改成默认 true 了(常用数据库是这个处理的)

2881099 avatar Feb 15 '26 11:02 2881099

为了降低解释成本,这个行为在一年前已经改成默认 true 了(常用数据库是这个处理的)

谢谢回复, 那就是注释的问题了

hatulaile avatar Feb 15 '26 11:02 hatulaile