mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 19:56:43 +08:00
Synchronization code
This commit is contained in:
parent
e4a9a88259
commit
d9720b1242
@ -367,11 +367,21 @@ namespace SqlSugar
|
||||
After(sql, result);
|
||||
return result;
|
||||
}
|
||||
public T ExecuteReturnEntity(bool isIncludesAllFirstLayer)
|
||||
{
|
||||
var data = ExecuteReturnEntity();
|
||||
return this.Context.Queryable<T>().WhereClassByPrimaryKey(data).IncludesAllFirstLayer().First();
|
||||
}
|
||||
public async Task<T> ExecuteReturnEntityAsync()
|
||||
{
|
||||
await ExecuteCommandIdentityIntoEntityAsync();
|
||||
return InsertObjs.First();
|
||||
}
|
||||
public async Task<T> ExecuteReturnEntityAsync(bool isIncludesAllFirstLayer)
|
||||
{
|
||||
var data=await ExecuteReturnEntityAsync();
|
||||
return await this.Context.Queryable<T>().WhereClassByPrimaryKey(data).IncludesAllFirstLayer().FirstAsync();
|
||||
}
|
||||
public async Task<bool> ExecuteCommandIdentityIntoEntityAsync()
|
||||
{
|
||||
var result = InsertObjs.First();
|
||||
|
@ -26,7 +26,9 @@ namespace SqlSugar
|
||||
Task<int> ExecuteReturnIdentityAsync();
|
||||
Task<int> ExecuteReturnIdentityAsync(CancellationToken token);
|
||||
T ExecuteReturnEntity();
|
||||
T ExecuteReturnEntity(bool isIncludesAllFirstLayer);
|
||||
Task<T> ExecuteReturnEntityAsync();
|
||||
Task<T> ExecuteReturnEntityAsync(bool isIncludesAllFirstLayer);
|
||||
bool ExecuteCommandIdentityIntoEntity();
|
||||
Task<bool> ExecuteCommandIdentityIntoEntityAsync();
|
||||
long ExecuteReturnBigIdentity();
|
||||
|
Loading…
Reference in New Issue
Block a user