Skip to content

Commit 99d3dec

Browse files
Revert "Update AuditibleEntityInterceptor.cs (#742)" (#758)
This reverts commit 785af3b.
1 parent 5e39277 commit 99d3dec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Infrastructure/Persistence/Interceptors/AuditibleEntityInterceptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ private void UpdateEntities(DbContext context)
5555
switch (entry.State)
5656
{
5757
case EntityState.Added:
58-
entry.Entity.CreatedBy ??= userId;
59-
entry.Entity.Created ??= dateTime.Now;
58+
entry.Entity.CreatedBy = userId;
59+
entry.Entity.Created = dateTime.Now;
6060
if (entry.Entity is IMustHaveTenant mustTenant && string.IsNullOrEmpty(mustTenant.TenantId))
6161
{
6262
mustTenant.TenantId = tenantId!;

0 commit comments

Comments
 (0)