Update exp to sql

This commit is contained in:
sunkaixuan
2019-04-20 12:58:45 +08:00
parent 33e3838528
commit de5d2cf881
2 changed files with 29 additions and 1 deletions

View File

@@ -453,7 +453,9 @@ namespace OrmTest.Demo
var test51 = db.Queryable<Student>().Select(it=>new { x= SqlFunc.ToDate(it.CreateTime).Year+"-" }).ToList();
var test52 = db.Queryable<Student>().Select(it => SqlFunc.IsNull(it.CreateTime, SqlFunc.GetDate())).ToList();
var test53 = db.Queryable<Student>().Select(it => SqlFunc.IsNull(it.CreateTime, SqlFunc.GetDate())).First();
var test54 = db.Queryable<Student>().Where(it => it.CreateTime == test52.First().Value).ToList();
}
public static void Page()
{
var db = GetInstance();