Browse Source
Merge pull request #24450 from abpframework/auto-merge/rel-10-0/4211
Merge branch dev with rel-10.0
pull/24452/head
Ma Liming
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
1 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs
|
|
|
@ -1,3 +1,5 @@ |
|
|
|
using System.Linq; |
|
|
|
using Microsoft.EntityFrameworkCore.Sqlite.Infrastructure.Internal; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.EntityFrameworkCore.GlobalFilters; |
|
|
|
using Volo.Abp.EntityFrameworkCore.Interceptors; |
|
|
|
@ -32,7 +34,10 @@ public class AbpEntityFrameworkCoreSqliteModule : AbpModule |
|
|
|
{ |
|
|
|
options.ConfigureDefaultOnConfiguring((dbContext, dbContextOptionsBuilder) => |
|
|
|
{ |
|
|
|
dbContextOptionsBuilder.AddInterceptors(new SqliteBusyTimeoutSaveChangesInterceptor(sqliteOptions.BusyTimeout.Value)); |
|
|
|
if (dbContextOptionsBuilder.Options.Extensions.Any(extension => extension is SqliteOptionsExtension)) |
|
|
|
{ |
|
|
|
dbContextOptionsBuilder.AddInterceptors(new SqliteBusyTimeoutSaveChangesInterceptor(sqliteOptions.BusyTimeout.Value)); |
|
|
|
} |
|
|
|
}, overrideExisting: false); |
|
|
|
}); |
|
|
|
} |
|
|
|
|