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