This commit is contained in:
sunkaixuan
2017-09-11 12:38:58 +08:00
parent fb1fa5d769
commit 013007f39b
5 changed files with 28 additions and 8 deletions

View File

@@ -282,6 +282,17 @@ namespace OrmTest.Demo
})
.Select((st, sc) => new { id=st.Id,school=sc }).ToList();
var list5 = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).AS<Student>("STUDENT").AS<School>("SCHOOL")
.Select((st, sc) => new { id = st.Id, school = sc }).ToList();
var list6 = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).With(SqlWith.NoLock).AS<Student>("STUDENT").AS<School>("SCHOOL")
.Select((st, sc) => new { id = st.Id, school = sc }).ToList();
}
public static void Join()
{