Beispiel #1
0
 private void SetLastChangeProperties(T entity, DateTime?now = null)
 {
     if (entity is ILastChangeTrackable lct)
     {
         lct.ModifiedUserId   = CurrentUserProvider.GetUserId();
         lct.ModifiedDateTime = now ?? DateTime.UtcNow;
     }
 }
Beispiel #2
0
 private void SetCreationProperties(T entity, DateTime?now = null)
 {
     if (entity is ICreationTrackable ct)
     {
         ct.CreatedUserId   = CurrentUserProvider.GetUserId();
         ct.CreatedDateTime = now ?? DateTime.UtcNow;
     }
 }