mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-22 02:51:58 +08:00
Add unit test
This commit is contained in:
@@ -355,8 +355,24 @@ namespace OrmTest
|
|||||||
.Where(y => y.SchoolA.School_Name == "")
|
.Where(y => y.SchoolA.School_Name == "")
|
||||||
.Select(y=>y.Name)=="a")
|
.Select(y=>y.Name)=="a")
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
var list9 = db.Queryable<SchoolA>()
|
||||||
|
.LeftJoin<StudentA>((x, y) => (x.SchoolId == y.SchoolId))
|
||||||
|
.LeftJoin<BookA>((x, y, z) => y.SchoolId == y.SchoolId)
|
||||||
|
.Select((x, y, z) => new UnitView01()
|
||||||
|
{
|
||||||
|
Name = x.School_Name,
|
||||||
|
}, true).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class UnitView01
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string SchoolName { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int BookId { get; set; }
|
||||||
|
public int StudentId { get; set; }
|
||||||
|
}
|
||||||
public class UnitA001
|
public class UnitA001
|
||||||
{
|
{
|
||||||
public int id { get; set; }
|
public int id { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user