update

2881099
2023-03-03 11:26:54 +08:00
parent 08d2674ad4
commit c5336cb512
2 changed files with 20 additions and 0 deletions

@@ -46,6 +46,16 @@ var list = fsql.Select<Topic>()
> To find the aggregate value without grouping, please use `ToAggregate` instead of `ToList`
```csharp
var list = fsql.Select<Topic>()
.ToAggregate(a => new
{
cou1 = a.Count(),
arg1 = a.Avg(a.Value.Clicks),
arg2 = a.Sum(a.Value.Clicks > 100 ? 1 : 0)
});
```
## Navigation Property Grouping
If `Topic` has the navigation property `Category`, and `Category` has the navigation property `Area`, the navigation property grouping code is as follows:

@@ -45,6 +45,16 @@ var list = fsql.Select<Topic>()
> 不分组求聚合值,请使用 ToAggregate 替代 ToList
```csharp
var list = fsql.Select<Topic>()
.ToAggregate(a => new
{
cou1 = a.Count(),
arg1 = a.Avg(a.Value.Clicks),
arg2 = a.Sum(a.Value.Clicks > 100 ? 1 : 0)
});
```
## 导航属性分组
假如 Topic 有导航属性 CategoryCategory 又有导航属性 Area导航属性分组代码如下