public override void Hook(Auditable entity, HookEntityMetadata metadata)
        {
            EntityState state = metadata.CurrentContext.Entry(entity).State;

            if (state != EntityState.Detached && state != EntityState.Unchanged)
            {
                AuditFields.SetUpdatedByField(entity, metadata, User);
                AuditFields.SetUpdatedAtField(entity);
            }
        }
 public override void Hook(Auditable entity, HookEntityMetadata metadata)
 {
     AuditFields.SetUpdatedByField(entity, metadata, User);
     entity.DeletedAt = DateTime.UtcNow;
 }