maliming
7 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
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); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|