mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 增加 AuditValue ObjectAuditBreak 实现对象只触发一次审计事件;
This commit is contained in:
@ -108,6 +108,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (changedDict != null && changedDict.ContainsKey(col.Attribute.Name) == false)
|
||||
changedDict.Add(col.Attribute.Name, true);
|
||||
}
|
||||
if (auditArgs.ObjectAuditBreak) break;
|
||||
|
||||
if (val == null && col.Attribute.MapType == typeof(string) && col.Attribute.IsNullable == false)
|
||||
col.SetValue(data, val = "");
|
||||
}
|
||||
|
@ -175,6 +175,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (changedDict != null && changedDict.ContainsKey(col.Attribute.Name) == false)
|
||||
changedDict.Add(col.Attribute.Name, true);
|
||||
}
|
||||
if (auditArgs.ObjectAuditBreak) break;
|
||||
}
|
||||
if (col.Attribute.IsPrimary)
|
||||
{
|
||||
|
@ -424,6 +424,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (changedDict != null && changedDict.ContainsKey(col.Attribute.Name) == false)
|
||||
changedDict.Add(col.Attribute.Name, true);
|
||||
}
|
||||
if (auditArgs.ObjectAuditBreak) break;
|
||||
|
||||
if (val == null && col.Attribute.MapType == typeof(string) && col.Attribute.IsNullable == false)
|
||||
col.SetValue(d, val = "");
|
||||
}
|
||||
@ -446,6 +448,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (changedDict != null && changedDict.ContainsKey(col.Attribute.Name) == false)
|
||||
changedDict.Add(col.Attribute.Name, true);
|
||||
}
|
||||
if (auditArgs.ObjectAuditBreak) break;
|
||||
|
||||
if (val == null && col.Attribute.MapType == typeof(string) && col.Attribute.IsNullable == false)
|
||||
col.SetValue(data, val = "");
|
||||
}
|
||||
|
Reference in New Issue
Block a user