Update DeleteNav

This commit is contained in:
sunkaixuan 2022-07-16 23:59:22 +08:00
parent fa1cf3ac81
commit aa151d7804
3 changed files with 13 additions and 4 deletions

View File

@ -74,11 +74,11 @@ namespace SqlSugar
private bool IsDeleteA() private bool IsDeleteA()
{ {
return deleteNavOptions != null && deleteNavOptions.ManyToMayIsDeleteA; return deleteNavOptions != null && deleteNavOptions.ManyToManyIsDeleteA;
} }
private bool IsDeleteB() private bool IsDeleteB()
{ {
return deleteNavOptions != null && deleteNavOptions.ManyToMayIsDeleteB; return deleteNavOptions != null && deleteNavOptions.ManyToManyIsDeleteB;
} }
} }
} }

View File

@ -78,6 +78,10 @@ namespace SqlSugar
{ {
return AsNav().ThenInclude(expression); return AsNav().ThenInclude(expression);
} }
public DeleteNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, List<TChild>>> expression,DeleteNavOptions options) where TChild : class, new()
{
return AsNav().ThenInclude(expression, options);
}
public bool ExecuteCommand() public bool ExecuteCommand()
{ {
PreFunc(); PreFunc();

View File

@ -8,7 +8,12 @@ namespace SqlSugar
{ {
public class DeleteNavOptions public class DeleteNavOptions
{ {
public bool ManyToMayIsDeleteA { get; set; } public bool ManyToManyIsDeleteA { get; set; }
public bool ManyToMayIsDeleteB { get; set; } public bool ManyToManyIsDeleteB { get; set; }
}
public class UpdateNavOptions
{
public bool ManyToManyIsUpdateA { get; set; }
public bool ManyToManyIsUpdateB { get; set; }
} }
} }