This commit is contained in:
610262374@qq.com
2017-03-06 14:31:15 +08:00
parent 516b2d785a
commit c24fc90871
3 changed files with 5 additions and 5 deletions

View File

@@ -34,7 +34,10 @@ namespace OrmTest.UnitTest
// .Select(it => new ViewModelStudent { Name = it.Name }).ToList();
//var list2 = db.Queryable<Student>()
// .Where(st => st.Id > 0)
// .Select("id").ToList();
// .Select("id").ToList();
var list = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).Where(st => st.Id > 0).Select<Student>("*").ToList();
var list3 = db.Queryable<Student>()
.Where(st => st.Id > 0)
.Select(it => new ViewModelStudent2 { Student = it }).ToList();