修复x.2版本的更新后无法再次查询bug
This commit is contained in:
parent
85f854577d
commit
ec6ff3f53e
|
@ -1,8 +1,8 @@
|
|||
:start
|
||||
::定义版本
|
||||
set EFCORE2=2.2.0.22-efcore2.1.0
|
||||
set EFCORE3=3.2.0.22
|
||||
set EFCORE5=5.2.0.22
|
||||
set EFCORE2=2.2.0.23
|
||||
set EFCORE3=3.2.0.23
|
||||
set EFCORE5=5.2.0.23
|
||||
|
||||
::删除所有bin与obj下的文件
|
||||
@echo off
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace ShardingCore.Sharding
|
|||
private DbContextOptions<T> _dbContextOptions;
|
||||
|
||||
private readonly object CREATELOCK = new object();
|
||||
private string connectionString;
|
||||
|
||||
public AbstractShardingDbContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
@ -97,7 +98,11 @@ namespace ShardingCore.Sharding
|
|||
}
|
||||
public string GetConnectionString()
|
||||
{
|
||||
return Database.GetDbConnection().ConnectionString;
|
||||
if (null == connectionString)
|
||||
{
|
||||
connectionString = Database.GetDbConnection().ConnectionString;
|
||||
}
|
||||
return connectionString;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue