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
f8cea00027
commit
f4c0350873
@ -107,6 +107,20 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit error");
|
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
|
public class TestDTO
|
||||||
|
Loading…
Reference in New Issue
Block a user