|
|
@ -244,6 +244,8 @@ namespace OrmTest.Demo |
|
|
|
var db = GetInstance(); |
|
|
|
var dbTime = db.GetDate(); |
|
|
|
var getAll = db.Queryable<Student>().Select<object>("*").ToList(); |
|
|
|
var getAll2 = db.Queryable<Student>().ToList(); |
|
|
|
var getRandomList = db.Queryable<Student>().OrderBy(it => SqlFunc.GetRandom()).ToList(); |
|
|
|
var getAllOrder = db.Queryable<Student>().OrderBy(it => it.Id).OrderBy(it => it.Name, OrderByType.Desc).ToList(); |
|
|
|
var getId = db.Queryable<Student>().Select(it => it.Id).ToList(); |
|
|
|
var getNew = db.Queryable<Student>().Where(it => it.Id == 1).Select(it => new { id = SqlFunc.IIF(it.Id == 0, 1, it.Id), it.Name, it.SchoolId }).ToList(); |
|
|
|