public virtual T AuditDefault(DomainBaseWithUserCreate entity, DomainBaseWithUserCreate entityOld) { var isNew = entityOld.IsNull(); if (isNew) { this.SetUserCreate(entity); } else { this.SetUserUpdate(entity, entityOld); } return(entity as T); }
protected void SetUserUpdate(DomainBaseWithUserCreate entity, DomainBaseWithUserCreate entityOld) { entity.SetUserCreate(entityOld.UserCreateId, entityOld.UserCreateDate); entity.SetUserUpdate(this._user.GetSubjectId <int>()); }
protected void SetUserCreate(DomainBaseWithUserCreate entity) { entity.SetUserCreate(this._user.GetSubjectId <int>()); }