mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 修改 SqlServerProvider 版本号获取逻辑 bug;
This commit is contained in:
parent
b3ec6cdf8d
commit
aee82f9caa
@ -527,14 +527,5 @@
|
|||||||
<param name="that"></param>
|
<param name="that"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Microsoft.Extensions.DependencyInjection.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
|
|
||||||
<summary>
|
|
||||||
批量注入 Repository,可以参考代码自行调整
|
|
||||||
</summary>
|
|
||||||
<param name="services"></param>
|
|
||||||
<param name="globalDataFilter"></param>
|
|
||||||
<param name="assemblies"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
@ -41,17 +41,17 @@ namespace FreeSql.Odbc.SqlServer
|
|||||||
this.CodeFirst = new OdbcSqlServerCodeFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
this.CodeFirst = new OdbcSqlServerCodeFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
||||||
|
|
||||||
if (this.Ado.MasterPool != null)
|
if (this.Ado.MasterPool != null)
|
||||||
using (var conn = this.Ado.MasterPool.Get())
|
|
||||||
{
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
using (var conn = this.Ado.MasterPool.Get())
|
||||||
{
|
{
|
||||||
(this.InternalCommonUtils as OdbcSqlServerUtils).ServerVersion = int.Parse(conn.Value.ServerVersion.Split('.')[0]);
|
(this.InternalCommonUtils as OdbcSqlServerUtils).ServerVersion = int.Parse(conn.Value.ServerVersion.Split('.')[0]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
internal CommonUtils InternalCommonUtils { get; }
|
internal CommonUtils InternalCommonUtils { get; }
|
||||||
internal CommonExpression InternalCommonExpression { get; }
|
internal CommonExpression InternalCommonExpression { get; }
|
||||||
|
@ -42,17 +42,17 @@ namespace FreeSql.SqlServer
|
|||||||
this.CodeFirst = new SqlServerCodeFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
this.CodeFirst = new SqlServerCodeFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
||||||
|
|
||||||
if (this.Ado.MasterPool != null)
|
if (this.Ado.MasterPool != null)
|
||||||
using (var conn = this.Ado.MasterPool.Get())
|
|
||||||
{
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
using (var conn = this.Ado.MasterPool.Get())
|
||||||
{
|
{
|
||||||
(this.InternalCommonUtils as SqlServerUtils).ServerVersion = int.Parse(conn.Value.ServerVersion.Split('.')[0]);
|
(this.InternalCommonUtils as SqlServerUtils).ServerVersion = int.Parse(conn.Value.ServerVersion.Split('.')[0]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
internal CommonUtils InternalCommonUtils { get; }
|
internal CommonUtils InternalCommonUtils { get; }
|
||||||
internal CommonExpression InternalCommonExpression { get; }
|
internal CommonExpression InternalCommonExpression { get; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user