- 调整 IUpdate.SetDto 也支持 IgnoreClumns 的逻辑;

This commit is contained in:
28810
2020-04-09 12:07:48 +08:00
parent 1afca09152
commit 0838599b78
2 changed files with 11 additions and 0 deletions

View File

@ -476,6 +476,7 @@ namespace FreeSql.Internal.CommonProvider
foreach (var kv in dic)
{
if (_table.ColumnsByCs.TryGetValue(kv.Key, out var trycol) == false) continue;
if (_ignore.ContainsKey(kv.Key)) continue;
SetPriv(trycol, kv.Value);
}
}
@ -483,6 +484,7 @@ namespace FreeSql.Internal.CommonProvider
foreach (var dtoProp in dtoProps)
{
if (_table.ColumnsByCs.TryGetValue(dtoProp.Name, out var trycol) == false) continue;
if (_ignore.ContainsKey(dtoProp.Name)) continue;
SetPriv(trycol, dtoProp.GetValue(dto, null));
}
return this;