mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-20 04:48:16 +08:00
- 增加 Aop.AuditValue 事件,在插入/更新数据时审计属性值;
This commit is contained in:
@ -563,7 +563,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
var auditArgs = new Aop.AuditValueEventArgs(Aop.AutoValueType.Insert, col, _table.Properties[col.CsName], val);
|
||||
_orm.Aop.AuditValue(this, auditArgs);
|
||||
if (auditArgs.Value != null)
|
||||
if (auditArgs.IsChanged)
|
||||
col.SetMapValue(d, val = auditArgs.Value);
|
||||
}
|
||||
if (_noneParameter)
|
||||
|
@ -610,7 +610,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
var auditArgs = new Aop.AuditValueEventArgs(Aop.AutoValueType.Update, col, _table.Properties[col.CsName], val);
|
||||
_orm.Aop.AuditValue(this, auditArgs);
|
||||
if (auditArgs.Value != null)
|
||||
if (auditArgs.IsChanged)
|
||||
col.SetMapValue(_source.First(), val = auditArgs.Value);
|
||||
}
|
||||
if (_noneParameter)
|
||||
@ -656,7 +656,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
var auditArgs = new Aop.AuditValueEventArgs(Aop.AutoValueType.Update, col, _table.Properties[col.CsName], val);
|
||||
_orm.Aop.AuditValue(this, auditArgs);
|
||||
if (auditArgs.Value != null)
|
||||
if (auditArgs.IsChanged)
|
||||
col.SetMapValue(_source.First(), val = auditArgs.Value);
|
||||
}
|
||||
if (_noneParameter)
|
||||
|
Reference in New Issue
Block a user