mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Update Storage
This commit is contained in:
parent
382f5262c9
commit
28b5e6fc84
@ -68,7 +68,7 @@ namespace SqlSugar
|
||||
return this;
|
||||
}
|
||||
|
||||
public int ExecuteUpdateOrInsert()
|
||||
public int ExecuteCommand()
|
||||
{
|
||||
var result = 0;
|
||||
var x = this.ToStorage();
|
||||
@ -76,10 +76,10 @@ namespace SqlSugar
|
||||
result += x.AsUpdateable.ExecuteCommand();
|
||||
return result;
|
||||
}
|
||||
public async Task<int> ExecuteUpdateOrInsertAsync()
|
||||
public async Task<int> ExecuteCommandAsync()
|
||||
{
|
||||
var result = 0;
|
||||
var x = await Task.Run(() => this.ToStorage());
|
||||
var x = await this.ToStorageAsync();
|
||||
result +=await x.AsInsertable.ExecuteCommandAsync();
|
||||
result +=await x.AsUpdateable.ExecuteCommandAsync();
|
||||
return result;
|
||||
|
@ -19,8 +19,8 @@ namespace SqlSugar
|
||||
StorageableResult<T> ToStorage();
|
||||
Task<StorageableResult<T>> ToStorageAsync();
|
||||
IStorageable<T> As(string tableName);
|
||||
int ExecuteUpdateOrInsert();
|
||||
Task<int> ExecuteUpdateOrInsertAsync();
|
||||
int ExecuteCommand();
|
||||
Task<int> ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public class StorageableInfo<T> where T : class, new()
|
||||
|
Loading…
Reference in New Issue
Block a user