Update Nav CUD

This commit is contained in:
sunkaixuan 2022-07-04 07:57:36 +08:00
parent 92085efcbc
commit 466b4b5b31
3 changed files with 42 additions and 10 deletions

View File

@ -15,12 +15,27 @@ namespace SqlSugar
public DeleteNavProvider<Root,TChild> ThenInclude<TChild>(Expression<Func<T,TChild>> expression)
{
return null;
throw new Exception("开发中7月15号之前上线");
}
public DeleteNavProvider<Root,Root> AsNav()
public DeleteNavProvider<Root, TChild> Include<TChild>(Expression<Func<T, TChild>> expression)
{
return null;
throw new Exception("开发中7月15号之前上线");
}
public DeleteNavProvider<Root, TChild> ThenInclude<TChild>(Expression<Func<T, List<TChild>>> expression)
{
throw new Exception("开发中7月15号之前上线");
}
public DeleteNavProvider<Root, TChild> Include<TChild>(Expression<Func<T, List<TChild>>> expression)
{
throw new Exception("开发中7月15号之前上线");
}
private DeleteNavProvider<Root,Root> AsNav()
{
throw new Exception("开发中7月15号之前上线");
}
public bool ExecuteCommand()
{
return true;
}
}
}

View File

@ -60,7 +60,7 @@ namespace SqlSugar
{
return AsNav().ThenInclude(expression);
}
public void ExecuteCommand()
public bool ExecuteCommand()
{
var hasTran = this.Context.Ado.Transaction != null;
if (hasTran)
@ -74,14 +74,16 @@ namespace SqlSugar
PreFunc();
}, ex => throw ex);
}
return true;
}
public async Task ExecuteCommandAsync()
public async Task<bool> ExecuteCommandAsync()
{
await Task.Run(async () =>
{
ExecuteCommand();
await Task.Delay(0);
});
return true;
}
private InsertNavTask<Root, Root> AsNav()

View File

@ -15,10 +15,25 @@ namespace SqlSugar
public UpdateNavProvider<Root,TChild> ThenInclude<TChild>(Expression<Func<T,TChild>> expression)
{
return null;
throw new Exception("开发中7月15号之前上线");
}
public UpdateNavProvider<Root,Root> AsNav()
public UpdateNavProvider<Root, TChild> Include<TChild>(Expression<Func<T, TChild>> expression)
{
throw new Exception("开发中7月15号之前上线");
}
public UpdateNavProvider<Root, TChild> ThenInclude<TChild>(Expression<Func<T, List<TChild>>> expression)
{
throw new Exception("开发中7月15号之前上线");
}
public UpdateNavProvider<Root, TChild> Include<TChild>(Expression<Func<T, List<TChild>>> expression)
{
throw new Exception("开发中7月15号之前上线");
}
public bool ExecuteCommand()
{
return true;
}
private UpdateNavProvider<Root,Root> AsNav()
{
return null;
}