|
|
@ -120,7 +120,7 @@ namespace OrmTest.Demo |
|
|
|
var db = GetInstance(); |
|
|
|
var getAll = db.Queryable<Student>().ToList(); |
|
|
|
var getId = db.Queryable<Student>().Select(it => it.Id).ToList(); |
|
|
|
// var getIdIIF= db.Queryable<Student>().Select(it =>new { id = SqlFunc.IIF(it.Id == 0, 1, it.Id) }).ToList();
|
|
|
|
var getIdIIF= db.Queryable<Student>().Select(it =>new { id = SqlFunc.IIF(it.Id == 0, 1, it.Id),it.Name,it.SchoolId }).ToList(); |
|
|
|
var getAllNoLock = db.Queryable<Student>().With(SqlWith.NoLock).ToList(); |
|
|
|
var getByPrimaryKey = db.Queryable<Student>().InSingle(2); |
|
|
|
var getSingleOrDefault = db.Queryable<Student>().Single(); |
|
|
|