mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 01:14:33 +08:00
Add unit test
This commit is contained in:
parent
74143f63ad
commit
ee54c5b2a3
@ -83,6 +83,16 @@ namespace OrmTest
|
|||||||
Db.Insertable(new UnitAbc121() { name="a",uid=null }).ExecuteCommand();
|
Db.Insertable(new UnitAbc121() { name="a",uid=null }).ExecuteCommand();
|
||||||
Db.Insertable(new UnitAbc121() { name = "a", uid=Guid.NewGuid() }).ExecuteCommand();
|
Db.Insertable(new UnitAbc121() { name = "a", uid=Guid.NewGuid() }).ExecuteCommand();
|
||||||
var list10= Db.Queryable<UnitAbc121>().ToList();
|
var list10= Db.Queryable<UnitAbc121>().ToList();
|
||||||
|
|
||||||
|
var count=Db.Queryable<Order>()
|
||||||
|
.Where(z => z.Id == SqlFunc.Subqueryable<Order>()
|
||||||
|
.GroupBy(x => x.Id).Select(x => x.Id))
|
||||||
|
.Count();
|
||||||
|
|
||||||
|
if (count != Db.Queryable<Order>().Count())
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user