Browse Source

Add test demo

pull/20/head
sunkaixuan 2 years ago
parent
commit
feffff0fe1
  1. 3
      Src/Asp.Net/PgSqlTest/Demo/Demo1_Queryable.cs
  2. 3
      Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs

3
Src/Asp.Net/PgSqlTest/Demo/Demo1_Queryable.cs

@ -51,6 +51,9 @@ namespace OrmTest
var q1 = db.Queryable<Order>().Take(1);
var q2 = db.Queryable<Order>().Take(2);
var test05 = db.UnionAll(q1, q2).ToList();
var test06 = db.Queryable<Order>().
Where(it => it.Price == 0 ? true : it.Name == it.Name)
.ToList();
Console.WriteLine("#### Examples End ####");
Console.WriteLine("#### Examples End ####");
}

3
Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs

@ -166,6 +166,9 @@ namespace OrmTest
var test44=db.Queryable<Order>().WhereColumns(new List<Dictionary<string, object>>() {
whereDc
}).ToList();
var test45 = db.Queryable<Order>().
Where(it=>it.Price==0?true:it.Name==it.Name)
.ToList();
Console.WriteLine("#### Examples End ####");
}

Loading…
Cancel
Save