mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-08 22:58:03 +08:00
Synchronization code
This commit is contained in:
parent
c10810775f
commit
0deae80f18
@ -76,7 +76,14 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var ids = mappgingTables.Select(x => x[mappingA.DbColumnName]).ToList();
|
var ids = mappgingTables.Select(x => x[mappingA.DbColumnName]).ToList();
|
||||||
this._Context.Deleteable<object>().AS(mappingEntity.DbTableName).In(mappingA.DbColumnName, ids).ExecuteCommand();
|
if (_navOptions != null && _navOptions.ManyToManyNoDeleteMap)
|
||||||
|
{
|
||||||
|
//The reserved
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._Context.Deleteable<object>().AS(mappingEntity.DbTableName).In(mappingA.DbColumnName, ids).ExecuteCommand();
|
||||||
|
}
|
||||||
this._Context.Insertable(mappgingTables).AS(mappingEntity.DbTableName).ExecuteCommand();
|
this._Context.Insertable(mappgingTables).AS(mappingEntity.DbTableName).ExecuteCommand();
|
||||||
SetNewParent<TChild>(thisEntity, thisPkColumn);
|
SetNewParent<TChild>(thisEntity, thisPkColumn);
|
||||||
}
|
}
|
||||||
|
@ -42,5 +42,6 @@ namespace SqlSugar
|
|||||||
public class InsertNavOptions
|
public class InsertNavOptions
|
||||||
{
|
{
|
||||||
public bool OneToManyIfExistsNoInsert { get; set; }
|
public bool OneToManyIfExistsNoInsert { get; set; }
|
||||||
|
public bool ManyToManyNoDeleteMap { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user