mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update inseret nav
This commit is contained in:
parent
96ac3b63af
commit
ee11466d12
@ -13,7 +13,7 @@ namespace SqlSugar
|
||||
public SqlSugarProvider Context { get; set; }
|
||||
public InsertNavProvider<Root, Root> insertNavProvider { get; set; }
|
||||
|
||||
public InsertNavTask<Root, TChild> ThenInclude<TChild>(Expression<Func<Root, TChild>> expression) where TChild : class, new()
|
||||
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, TChild>> expression) where TChild : class, new()
|
||||
{
|
||||
this.Context = insertNavProvider._Context;
|
||||
InsertNavTask<Root, TChild> result = new InsertNavTask<Root, TChild>();
|
||||
@ -22,7 +22,7 @@ namespace SqlSugar
|
||||
result.Context = this.Context;
|
||||
return result;
|
||||
}
|
||||
public InsertNavTask<Root, TChild> ThenInclude<TChild>(Expression<Func<Root, List<TChild>>> expression) where TChild : class, new()
|
||||
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, List<TChild>>> expression) where TChild : class, new()
|
||||
{
|
||||
this.Context = insertNavProvider._Context;
|
||||
InsertNavTask<Root, TChild> result = new InsertNavTask<Root, TChild>();
|
||||
@ -52,6 +52,14 @@ namespace SqlSugar
|
||||
result.Context = this.Context;
|
||||
return result;
|
||||
}
|
||||
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, TChild>> expression) where TChild : class, new()
|
||||
{
|
||||
return AsNav().ThenInclude(expression);
|
||||
}
|
||||
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, List<TChild>>> expression) where TChild : class, new()
|
||||
{
|
||||
return AsNav().ThenInclude(expression);
|
||||
}
|
||||
public void ExecuteCommand()
|
||||
{
|
||||
var hasTran = this.Context.Ado.Transaction != null;
|
||||
@ -76,7 +84,7 @@ namespace SqlSugar
|
||||
});
|
||||
}
|
||||
|
||||
public InsertNavTask<Root, Root> AsNav()
|
||||
private InsertNavTask<Root, Root> AsNav()
|
||||
{
|
||||
InsertNavTask<Root, Root> result = new InsertNavTask<Root, Root>();
|
||||
Func<InsertNavProvider<Root, Root>> func = () => PreFunc().AsNav();
|
||||
|
Loading…
Reference in New Issue
Block a user