diff --git a/Src/Asp.NetCore2/ClickHouseTest/Demo/Demo1_Queryable.cs b/Src/Asp.NetCore2/ClickHouseTest/Demo/Demo1_Queryable.cs index 513c459d7..ecbcc7227 100644 --- a/Src/Asp.NetCore2/ClickHouseTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.NetCore2/ClickHouseTest/Demo/Demo1_Queryable.cs @@ -31,6 +31,14 @@ namespace OrmTest var db = GetInstance(); var dbTime = db.GetDate(); var getAll = db.Queryable().ToList(); + var getAll2 = db.Queryable().Select(x => x.CreateTime.Date).ToList(); + var getAll3 = db.Queryable().Select(x =>Convert.ToDateTime(x.CreateTime)).ToList(); + var getAll4 = db.Queryable().Select(x=>x.CreateTime.AddDays(1)).ToList(); + var getAll5 = db.Queryable().Select(x => x.CreateTime.AddMonths(1)).ToList(); + var getAll6 = db.Queryable().Select(x => SqlFunc.DateAdd(x.CreateTime, 1)).ToList(); + var getAll7 = db.Queryable().Select(x => x.Name.ToString()).ToList(); + var getAll8 = db.Queryable().Select(x => x.CreateTime.ToString("yyyy-MM-dd")).ToList(); + var getAll9 = db.Queryable().Select(x => x.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")).ToList(); var getOrderBy = db.Queryable().OrderBy(it => it.Name,OrderByType.Desc).ToList(); var getOrderBy2 = db.Queryable().OrderBy(it => it.Id).OrderBy(it => it.Name, OrderByType.Desc).ToList(); var getOrderBy3 = db.Queryable().OrderBy(it =>new { it.Name,it.Id}).ToList();