Skip to content

Commit

Permalink
Nicer pattern matching syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
inghamc committed Jan 19, 2024
1 parent 4364fe0 commit 7771aea
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public void UpdateEntities(DbContext? context)

foreach (var entry in context.ChangeTracker.Entries<BaseAuditableEntity>())
{
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)
Expand Down

0 comments on commit 7771aea

Please sign in to comment.