修复事务
This commit is contained in:
parent
9f26b1947f
commit
89551d77dd
|
@ -32,6 +32,10 @@ namespace ShardingCore.EFCores
|
||||||
{
|
{
|
||||||
_shardingDbContext =
|
_shardingDbContext =
|
||||||
shardingDbContext ?? throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
|
shardingDbContext ?? throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
|
||||||
|
_shardingDbContextExecutor = shardingDbContext.GetShardingExecutor() ??
|
||||||
|
throw new ShardingCoreInvalidOperationException(
|
||||||
|
$"{shardingDbContext.GetType()} cant get {nameof(IShardingDbContextExecutor)} from {nameof(shardingDbContext.GetShardingExecutor)}");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,6 +59,10 @@ namespace ShardingCore.EFCores
|
||||||
{
|
{
|
||||||
_shardingDbContext =
|
_shardingDbContext =
|
||||||
shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
|
shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
|
||||||
|
_shardingDbContextExecutor = shardingDbContext.GetShardingExecutor() ??
|
||||||
|
throw new ShardingCoreInvalidOperationException(
|
||||||
|
$"{shardingDbContext.GetType()} cant get {nameof(IShardingDbContextExecutor)} from {nameof(shardingDbContext.GetShardingExecutor)}");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue