Browse Source

Update demo

pull/10/MERGE
sunkaixuna 3 years ago
parent
commit
1656318ac3
  1. 1
      Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs
  2. 1
      Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs

1
Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs

@ -83,6 +83,7 @@ namespace OrmTest
var getByFuns2 = db.Queryable<Order>().GroupBy(it => it.Name).Select(it => SqlFunc.AggregateDistinctCount(it.Price)).ToList();
var dp = DateTime.Now;
var test05 = db.Queryable<Order>().Where(it => it.CreateTime.Month == dp.Month).ToList();
var fromatList = db.Queryable<Order>().Select(it => it.CreateTime.ToString("%Y-%m")).ToList();
Console.WriteLine("#### Examples End ####");
}

1
Src/Asp.Net/SqliteTest/Demo/Demo1_Queryable.cs

@ -42,6 +42,7 @@ namespace OrmTest
var getByWhere2 = db.Queryable<Order>().Where(it => it.Id == DateTime.Now.Year).ToList();
var getByFuns = db.Queryable<Order>().Where(it => SqlFunc.IsNullOrEmpty(it.Name)).ToList();
var getByFuns2 = db.Queryable<Order>().GroupBy(it => it.Name).Select(it => SqlFunc.AggregateDistinctCount(it.Price)).ToList();
var fromatList = db.Queryable<Order>().Select(it=>it.CreateTime.ToString("%Y-%m")).ToList();
Console.WriteLine("#### Examples End ####");
}

Loading…
Cancel
Save