mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Add unit test
This commit is contained in:
@@ -107,6 +107,20 @@ namespace OrmTest
|
||||
{
|
||||
throw new Exception("unit error");
|
||||
}
|
||||
|
||||
var test8 = db.Queryable<Order>()
|
||||
.LeftJoin<Order>((x, y) => x.Id == y.Id)
|
||||
.Take(2)
|
||||
.Select((x, y) => new TestDTO
|
||||
{
|
||||
SubOne = new TestSubDTO { NameOne = "a", NameTwo =x.Name }
|
||||
})
|
||||
.ToList();
|
||||
|
||||
if (test8.First().SubOne.NameOne != "a" || test8.First().SubOne.NameTwo != "jack")
|
||||
{
|
||||
throw new Exception("unit error");
|
||||
}
|
||||
}
|
||||
|
||||
public class TestDTO
|
||||
|
Reference in New Issue
Block a user