优化bug
This commit is contained in:
parent
56d16abf90
commit
4ad6b06f1d
|
@ -170,7 +170,7 @@ namespace ShardingCore.DynamicDataSources
|
|||
if (context is IShardingDbContext shardingDbContext)
|
||||
{
|
||||
using (var dbContext =
|
||||
shardingDbContext.GetDbContext(dataSourceName, false,
|
||||
shardingDbContext.GetDbContext(dataSourceName, true,
|
||||
_routeTailFactory.Create(string.Empty, false)))
|
||||
{
|
||||
var isDefault = virtualDataSource.IsDefault(dataSourceName);
|
||||
|
@ -193,7 +193,7 @@ namespace ShardingCore.DynamicDataSources
|
|||
{
|
||||
if (context is IShardingDbContext shardingDbContext)
|
||||
{
|
||||
using (var dbContext = shardingDbContext.GetDbContext(dataSourceName, false,
|
||||
using (var dbContext = shardingDbContext.GetDbContext(dataSourceName, true,
|
||||
_routeTailFactory.Create(string.Empty, false)))
|
||||
{
|
||||
dbContext.RemoveDbContextAllRelationModel();
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace ShardingCore.TableCreator
|
|||
{
|
||||
|
||||
var shardingDbContext = (IShardingDbContext)dbContext;
|
||||
using (var context = shardingDbContext.GetDbContext(dataSourceName, false,
|
||||
using (var context = shardingDbContext.GetDbContext(dataSourceName, true,
|
||||
_routeTailFactory.Create(tail, false)))
|
||||
{
|
||||
context.RemoveDbContextRelationModelSaveOnlyThatIsNamedType(shardingEntityType);
|
||||
|
|
Loading…
Reference in New Issue