mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 DbContext/UnitOfWork EntityChangeReport 参数 BeforeObject 值无效的 bug;
This commit is contained in:
@ -373,7 +373,7 @@ namespace FreeSql
|
||||
var affrows = await update.ExecuteAffrowsAsync();
|
||||
_db._entityChangeReport.AddRange(data.Select(a => new DbContext.EntityChangeReport.ChangeInfo {
|
||||
Object = a.Value,
|
||||
BeforeObject = _states.TryGetValue(a.Key, out var beforeVal) ? beforeVal.Value : null,
|
||||
BeforeObject = _states.TryGetValue(a.Key, out var beforeVal) ? CreateEntityState(beforeVal.Value).Value : null,
|
||||
Type = DbContext.EntityChangeType.Update
|
||||
}));
|
||||
|
||||
|
@ -410,7 +410,7 @@ namespace FreeSql
|
||||
_db._entityChangeReport.AddRange(data.Select(a => new DbContext.EntityChangeReport.ChangeInfo
|
||||
{
|
||||
Object = a.Value,
|
||||
BeforeObject = _states.TryGetValue(a.Key, out var beforeVal) ? beforeVal.Value : null,
|
||||
BeforeObject = _states.TryGetValue(a.Key, out var beforeVal) ? CreateEntityState(beforeVal.Value).Value : null,
|
||||
Type = DbContext.EntityChangeType.Update
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user