This commit is contained in:
sunkaixuan
2017-05-31 01:29:25 +08:00
parent c077d987c6
commit e890b716cb
6 changed files with 26 additions and 10 deletions

View File

@@ -130,6 +130,10 @@ namespace OrmTest.Demo
var isAny = db.Queryable<Student>().Where(it => it.Id == -1).Any();
var isAny2 = db.Queryable<Student>().Any(it => it.Id == -1);
var getListByRename = db.Queryable<School>().AS("Student").ToList();
var in1 = db.Queryable<Student>().In(it=>it.Id,new int[] { 1, 2, 3 }).ToList();
var in2 = db.Queryable<Student>().In(new int[] { 1, 2, 3 }).ToList();
int[] array = new int[] { 1, 2 };
var in3 = db.Queryable<Student>().Where(it=>NBORM.ContainsArray(array, it.Id)).ToList();
var group = db.Queryable<Student>().GroupBy(it => it.Id)
.Having(it => NBORM.AggregateCount(it.Id) > 10)
.Select(it => new { id = NBORM.AggregateCount(it.Id) }).ToList();