From 2bd25286f23ce2d5ae40a7c56adab2b4c6ce7fde Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 27 Nov 2022 13:40:12 +0800 Subject: [PATCH] Add unit test --- .../SqlSeverTest/UnitTest/UCustom012.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UCustom012.cs b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UCustom012.cs index d67b1b5d3..b4d4097bb 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UCustom012.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UCustom012.cs @@ -132,6 +132,23 @@ namespace OrmTest { it.UnitA002 = db.Queryable().SetContext(x => x.orgid, () => it.id, it).First(); }); + + var list4=db.Queryable() + .LeftJoin((x, y) => (x.SchoolId == y.SchoolId)) + .LeftJoin((x,y,z)=>y.SchoolId==y.SchoolId) + .Select((x,y,z) => new UnitView01() + { + Name=x.SchoolName, + },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