Skip to content

Commit

Permalink
Update AbpDbContext.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming committed Mar 20, 2024
1 parent 5a9717c commit 8a0254f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public override async Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess,
List<EntityChangeInfo>? entityChangeList = null;
if (auditLog != null)
{
EntityHistoryHelper.InitializeNavigationHelper(AbpEfCoreNavigationHelper);
entityChangeList = EntityHistoryHelper.CreateChangeList(ChangeTracker.Entries().ToList());
}

Expand Down Expand Up @@ -278,8 +279,6 @@ public virtual void Initialize(AbpEfCoreDbContextInitializationContext initializ
ChangeTracker.Tracked += ChangeTracker_Tracked;
ChangeTracker.StateChanged += ChangeTracker_StateChanged;

EntityHistoryHelper.InitializeNavigationHelper(AbpEfCoreNavigationHelper);

if (UnitOfWorkManager is AlwaysDisableTransactionsUnitOfWorkManager)
{
Database.AutoTransactionBehavior = AutoTransactionBehavior.Never;
Expand Down

0 comments on commit 8a0254f

Please sign in to comment.