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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
0 deletions
-
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)) |
|
|
|
{ |
|
|
|
|