mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 02:35:04 +08:00
Update Oracle batch updates
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user