Browse Source

Synchronization code

pull/25/head
sunkaixuan 2 years ago
parent
commit
2b26f7e0f6
  1. 4
      Src/Asp.NetCore2/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs
  2. 2
      Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableHelper.cs

4
Src/Asp.NetCore2/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs

@ -38,6 +38,10 @@ namespace SqlSugar
foreach (var item in parentList)
{
var items= parentNavigateProperty.PropertyInfo.GetValue(item);
if (items == null)
{
continue;
}
var children=((List<TChild>)items);
InsertDatas(children, thisPkColumn);
var parentId = parentPkColumn.PropertyInfo.GetValue(item);

2
Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableHelper.cs

@ -464,7 +464,7 @@ namespace SqlSugar
it.PropertyName.EqualCase(verColumn.PropertyName));
if (data == null)
{
data = new DbColumnInfo() { DbColumnName= verColumn.DbColumnName, Value=newValue };
data = new DbColumnInfo() { DbColumnName= verColumn.DbColumnName,PropertyName=verColumn.PropertyName, Value=newValue };
this.UpdateBuilder.DbColumnInfoList.Add(data);
}
data.Value = newValue;

Loading…
Cancel
Save