diff --git a/src/Infrastructure/Data/Interceptors/AuditableEntityInterceptor.cs b/src/Infrastructure/Data/Interceptors/AuditableEntityInterceptor.cs index 9cbb3ec3c..e6872cb6d 100644 --- a/src/Infrastructure/Data/Interceptors/AuditableEntityInterceptor.cs +++ b/src/Infrastructure/Data/Interceptors/AuditableEntityInterceptor.cs @@ -39,7 +39,8 @@ public void UpdateEntities(DbContext? context) foreach (var entry in context.ChangeTracker.Entries()) { - if (entry.State == EntityState.Added || entry.State == EntityState.Modified || entry.HasChangedOwnedEntities()) + + if (entry.State is EntityState.Added or EntityState.Modified || entry.HasChangedOwnedEntities()) { var utcNow = _dateTime.GetUtcNow(); if (entry.State == EntityState.Added)