diff --git a/FreeSql.Tests/FreeSql.Tests.DbContext/UnitTest1.cs b/FreeSql.Tests/FreeSql.Tests.DbContext/UnitTest1.cs index 17f73605..663056ed 100644 --- a/FreeSql.Tests/FreeSql.Tests.DbContext/UnitTest1.cs +++ b/FreeSql.Tests/FreeSql.Tests.DbContext/UnitTest1.cs @@ -26,28 +26,28 @@ namespace FreeSql.Tests g.sqlite.Delete().Where("1=1").ExecuteAffrows(); BaseEntity.Initialization(g.sqlite); - userinfo user = new userinfo { userid = 1 }; + userinfo user = new userinfo { userid = 1, badgenumber = "", Name="", IDCardNo="" }; user.Insert(); user.depts = new List( new[] { - new DEPARTMENTS { deptid = 1, deptcode = "01" }, - new DEPARTMENTS { deptid = 2, deptcode = "02" }, - new DEPARTMENTS { deptid = 3, deptcode = "03" }, + new DEPARTMENTS { deptid = 1, deptcode = "01", deptname = "" }, + new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" }, + new DEPARTMENTS { deptid = 3, deptcode = "03" , deptname = ""}, }); user.SaveMany("depts"); user.depts = new List( new[] { - new DEPARTMENTS { deptid = 1, deptcode = "01" }, - new DEPARTMENTS { deptid = 2, deptcode = "02" }, - new DEPARTMENTS { deptid = 4, deptcode = "04" }, + new DEPARTMENTS { deptid = 1, deptcode = "01", deptname = "" }, + new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" }, + new DEPARTMENTS { deptid = 4, deptcode = "04", deptname = "" }, }); user.SaveMany("depts"); user.depts = new List( new[] { - new DEPARTMENTS { deptid = 2, deptcode = "02" }, + new DEPARTMENTS { deptid = 2, deptcode = "02", deptname = "" }, }); user.SaveMany("depts"); diff --git a/Providers/FreeSql.Provider.SqlServer/SqlServerAdo/SqlServerConnectionPool.cs b/Providers/FreeSql.Provider.SqlServer/SqlServerAdo/SqlServerConnectionPool.cs index 4cba9ac5..6e543e31 100644 --- a/Providers/FreeSql.Provider.SqlServer/SqlServerAdo/SqlServerConnectionPool.cs +++ b/Providers/FreeSql.Provider.SqlServer/SqlServerAdo/SqlServerConnectionPool.cs @@ -71,7 +71,7 @@ namespace FreeSql.SqlServer Match m = Regex.Match(_connectionString, pattern, RegexOptions.IgnoreCase); if (m.Success == false || int.TryParse(m.Groups[1].Value, out var poolsize) == false || poolsize <= 0) poolsize = 100; var connStrIncr = dicConnStrIncr.AddOrUpdate(_connectionString, 1, (oldkey, oldval) => Math.Min(5, oldval + 1)); - PoolSize = poolsize +connStrIncr; + PoolSize = poolsize + connStrIncr; _connectionString = m.Success ? Regex.Replace(_connectionString, pattern, $"Max pool size={PoolSize}", RegexOptions.IgnoreCase) : $"{_connectionString};Max pool size={PoolSize}";