mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:07:23 +08:00
Oracle ExecommandAsync -1 bug
This commit is contained in:
parent
2e21371302
commit
12cdbf24ba
@ -59,6 +59,17 @@ namespace OrmTest
|
|||||||
new UnitGuidTest() { Id = Guid.NewGuid(),name= "a" }
|
new UnitGuidTest() { Id = Guid.NewGuid(),name= "a" }
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
|
|
||||||
|
var updateObjs = new List<Order> {
|
||||||
|
new Order() { Id = 11, Name = "order11" }
|
||||||
|
};
|
||||||
|
|
||||||
|
//update all columns by primary key
|
||||||
|
|
||||||
|
if (Db.Updateable(updateObjs).ExecuteCommandAsync().GetAwaiter().GetResult() != 1)
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class UnitGuidTest
|
public class UnitGuidTest
|
||||||
|
@ -40,7 +40,15 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (base.UpdateObjs.Count() == 1)
|
if (base.UpdateObjs.Count() == 1)
|
||||||
{
|
{
|
||||||
return await base.ExecuteCommandAsync();
|
var result= await base.ExecuteCommandAsync();
|
||||||
|
if (result == -1)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (base.UpdateObjs.Count() == 0)
|
else if (base.UpdateObjs.Count() == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user