This commit is contained in:
610262374@qq.com
2017-03-13 13:51:02 +08:00
parent 69b5ea419d
commit 0dc141faa9
7 changed files with 57 additions and 5 deletions

View File

@@ -34,9 +34,11 @@ namespace OrmTest.UnitTest
{
Console.WriteLine(sql+" " + pars);
};
var list = db.Queryable<Student>()
var list = db.Queryable<School,School>((st,st2)=>new object[] {
JoinType.Left,st.Id==st2.Id
})
.Where(st => st.Id > 0)
.Select(it => new ViewModelStudent { Name = it.Name }).ToList();
.Select(st => new ViewModelStudent { School=st}).ToList();
var list2 = db.Queryable<Student>()
.Where(st => st.Id > 0)