From 1656318ac39faf774db873276ba8ba5930c4c150 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Wed, 15 Dec 2021 21:46:37 +0800 Subject: [PATCH] Update demo --- Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs | 1 + Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs index 689f96175..73ba4ee85 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs @@ -83,6 +83,7 @@ namespace OrmTest var getByFuns2 = db.Queryable().GroupBy(it => it.Name).Select(it => SqlFunc.AggregateDistinctCount(it.Price)).ToList(); var dp = DateTime.Now; var test05 = db.Queryable().Where(it => it.CreateTime.Month == dp.Month).ToList(); + var fromatList = db.Queryable().Select(it => it.CreateTime.ToString("%Y-%m")).ToList(); Console.WriteLine("#### Examples End ####"); } diff --git a/Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs b/Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs index affc980f0..fd1dfe982 100644 --- a/Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs @@ -42,6 +42,7 @@ namespace OrmTest var getByWhere2 = db.Queryable().Where(it => it.Id == DateTime.Now.Year).ToList(); var getByFuns = db.Queryable().Where(it => SqlFunc.IsNullOrEmpty(it.Name)).ToList(); var getByFuns2 = db.Queryable().GroupBy(it => it.Name).Select(it => SqlFunc.AggregateDistinctCount(it.Price)).ToList(); + var fromatList = db.Queryable().Select(it=>it.CreateTime.ToString("%Y-%m")).ToList(); Console.WriteLine("#### Examples End ####"); }