mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-17 17:41:28 +08:00
Add unit test
This commit is contained in:
@@ -18,6 +18,7 @@ namespace OrmTest
|
|||||||
db.Insertable(new ClassA() { fId = 1, username = "a" }).ExecuteCommand();
|
db.Insertable(new ClassA() { fId = 1, username = "a" }).ExecuteCommand();
|
||||||
var list = db.Queryable<ClassA>().Select<ClassDTO>().ToList();
|
var list = db.Queryable<ClassA>().Select<ClassDTO>().ToList();
|
||||||
if (list.First().fId != 1 && list.First().username != "a") throw new Exception("unit error");
|
if (list.First().fId != 1 && list.First().username != "a") throw new Exception("unit error");
|
||||||
|
db.Queryable<ClassA>().OrderBy(it => new { it.fId, it.username }).ToList();
|
||||||
db.DbMaintenance.DropTable<ClassA>();
|
db.DbMaintenance.DropTable<ClassA>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user