Browse Source
Merge pull request #1015 from colinin/fix-migrations-dbcontext
fix(migrations): 修复迁移时DI容器不可用(#1011)
pull/1050/head
yx lin
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
4 deletions
-
aspnet-core/framework/data-protection/LINGYUN.Abp.DataProtection.EntityFrameworkCore/LINGYUN/Abp/DataProtection/EntityFrameworkCore/AbpDataProtectionDbContext.cs
|
|
@ -24,10 +24,13 @@ public abstract class AbpDataProtectionDbContext<TDbContext> : AbpDbContext<TDbC |
|
|
{ |
|
|
{ |
|
|
base.OnConfiguring(optionsBuilder); |
|
|
base.OnConfiguring(optionsBuilder); |
|
|
|
|
|
|
|
|
// TODO: 需要优化表达式树
|
|
|
if (LazyServiceProvider != null) |
|
|
// optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedReadEntityInterceptor>());
|
|
|
{ |
|
|
//optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedWriteEntityInterceptor>());
|
|
|
// TODO: 需要优化表达式树
|
|
|
optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedWritePropertiesInterceptor>()); |
|
|
// optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedReadEntityInterceptor>());
|
|
|
|
|
|
//optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedWriteEntityInterceptor>());
|
|
|
|
|
|
optionsBuilder.AddInterceptors(LazyServiceProvider.GetRequiredService<AbpDataProtectedWritePropertiesInterceptor>()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected override void ApplyAbpConceptsForAddedEntity(EntityEntry entry) |
|
|
protected override void ApplyAbpConceptsForAddedEntity(EntityEntry entry) |
|
|
|