mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update unit test
This commit is contained in:
parent
40bdcc3e2c
commit
2cbb6e727f
@ -33,14 +33,16 @@ namespace OrmTest
|
|||||||
}).ExecuteCommandWithOptLock();
|
}).ExecuteCommandWithOptLock();
|
||||||
if (data2 != 0) { throw new Exception("unit error"); };
|
if (data2 != 0) { throw new Exception("unit error"); };
|
||||||
|
|
||||||
var data3 = db.Updateable(new ULockEntity()
|
var yy = new ULockEntity()
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
Name = "newname2",
|
Name = "newname2",
|
||||||
Ver = 0
|
Ver = 0
|
||||||
})
|
};
|
||||||
|
var data3 = db.Updateable(yy)
|
||||||
.UpdateColumns(z=>z.Name).ExecuteCommandWithOptLock();
|
.UpdateColumns(z=>z.Name).ExecuteCommandWithOptLock();
|
||||||
if (data3 != 0) { throw new Exception("unit error"); }
|
if (data3 != 0) { throw new Exception("unit error"); }
|
||||||
|
if(yy.Ver!=0) { throw new Exception("unit error"); }
|
||||||
var ver = db.Queryable<ULockEntity>().InSingle(id);
|
var ver = db.Queryable<ULockEntity>().InSingle(id);
|
||||||
var data4 = db.Updateable(new ULockEntity()
|
var data4 = db.Updateable(new ULockEntity()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user