mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 04:45:54 +08:00
Update Oracle batch updates
This commit is contained in:
parent
5a10604799
commit
91970743d1
@ -66,7 +66,7 @@ namespace SqlSugar
|
||||
{
|
||||
return this.ExecuteCommand() > 0;
|
||||
}
|
||||
public async Task<int> ExecuteCommandAsync()
|
||||
public virtual async Task<int> ExecuteCommandAsync()
|
||||
{
|
||||
string sql = _ExecuteCommand();
|
||||
if (string.IsNullOrEmpty(sql))
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
@ -27,5 +28,21 @@ namespace SqlSugar
|
||||
return base.UpdateObjs.Count();
|
||||
}
|
||||
}
|
||||
public async override Task<int> ExecuteCommandAsync()
|
||||
{
|
||||
if (base.UpdateObjs.Count() == 1)
|
||||
{
|
||||
return await base.ExecuteCommandAsync();
|
||||
}
|
||||
else if (base.UpdateObjs.Count() == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
await base.ExecuteCommandAsync();
|
||||
return base.UpdateObjs.Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user