mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add unit test
This commit is contained in:
parent
78efee8ebd
commit
a5f713533d
@ -47,6 +47,14 @@ namespace OrmTest
|
||||
var ids2 = db.Insertable(new List<UnitIdentity01>() { new UnitIdentity01() { Name = "c" }, new UnitIdentity01() { Name = "c" } }).ExecuteReturnPkList<int>();
|
||||
if (ids2.Count(z => z > 0) != 2) { throw new Exception("unit error"); }
|
||||
if (db.Queryable<UnitIdentity01>().In(ids2).Count() != 2) { throw new Exception("unit error"); }
|
||||
var list = new List<UnitIdentity01>();
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
list.Add(new UnitIdentity01() { Name = "a" });
|
||||
}
|
||||
var ids3 = db.Insertable(list).ExecuteReturnPkList<int>();
|
||||
if (db.Queryable<UnitIdentity01>().In(ids3).Count() != 1000) { throw new Exception("unit error"); }
|
||||
db.DbMaintenance.TruncateTable<UnitIdentity01>();
|
||||
}
|
||||
|
||||
public class UnitGuid123
|
||||
|
Loading…
Reference in New Issue
Block a user