Update Storage

This commit is contained in:
sunkaixuan 2022-03-26 23:04:11 +08:00
parent 382f5262c9
commit 28b5e6fc84
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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()