Browse Source
Merge pull request #24067 from abpframework/auto-merge/rel-10-0/4081
Merge branch dev with rel-10.0
pull/24073/head
Ma Liming
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
10 additions and
2 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs
|
|
|
@ -13,11 +13,19 @@ public static class AbpDbContextConfigurationContextMySQLExtensions |
|
|
|
{ |
|
|
|
if (context.ExistingConnection != null) |
|
|
|
{ |
|
|
|
return context.DbContextOptions.UseMySQL(context.ExistingConnection, mySQLOptionsAction); |
|
|
|
return context.DbContextOptions.UseMySQL(context.ExistingConnection, optionsBuilder => |
|
|
|
{ |
|
|
|
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); |
|
|
|
mySQLOptionsAction?.Invoke(optionsBuilder); |
|
|
|
}); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return context.DbContextOptions.UseMySQL(context.ConnectionString, mySQLOptionsAction); |
|
|
|
return context.DbContextOptions.UseMySQL(context.ConnectionString, optionsBuilder => |
|
|
|
{ |
|
|
|
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); |
|
|
|
mySQLOptionsAction?.Invoke(optionsBuilder); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|