Browse Source

Merge pull request #24108 from abpframework/AbpDbContext-modifiedProperties

Add `modifiedProperties` in DbContext
pull/24109/head
Engincan VESKE 3 months ago
committed by GitHub
parent
commit
3be80cc0cb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

1
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -442,6 +442,7 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
break;
}
var modifiedProperties = entry.Properties.Where(x => x.IsModified).ToList();
var disableAuditingAttributes = modifiedProperties.Select(x => x.Metadata.PropertyInfo?.GetCustomAttribute<DisableAuditingAttribute>()).ToList();
if (disableAuditingAttributes.Any(x => x == null || x.UpdateModificationProps))
{

Loading…
Cancel
Save