mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Add demo
This commit is contained in:
parent
3aebf06697
commit
fe61d5f9cc
@ -64,6 +64,20 @@ namespace OrmTest
|
|||||||
).ToListAsync().GetAwaiter().GetResult();
|
).ToListAsync().GetAwaiter().GetResult();
|
||||||
List<(int id, string name)> list2=db.Queryable<Order>().Select<(int id, string name)>("id,name")
|
List<(int id, string name)> list2=db.Queryable<Order>().Select<(int id, string name)>("id,name")
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var list3 = db.Queryable<Order>().Select(it => new {
|
||||||
|
mx1 = SqlFunc.RowMax(it.Id, it.Id, it.Name),
|
||||||
|
mx2 = SqlFunc.RowMax(it.Id),
|
||||||
|
mi1 = SqlFunc.RowMin(it.Id, it.Id, it.Name),
|
||||||
|
mi2 = SqlFunc.RowMin(it.Id),
|
||||||
|
c1 = SqlFunc.RowCount(it.Id, it.Id, it.Name),
|
||||||
|
c2 = SqlFunc.RowCount(),
|
||||||
|
a = SqlFunc.RowAvg(it.Id, it.Id, it.Name),
|
||||||
|
a2 = SqlFunc.RowAvg(it.Id),
|
||||||
|
s = SqlFunc.RowSum(it.Id, it.Id, it.Name),
|
||||||
|
s2 = SqlFunc.RowSum(it.Id),
|
||||||
|
}).ToList();
|
||||||
Console.WriteLine("#### Examples End ####");
|
Console.WriteLine("#### Examples End ####");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user