# DataSourceAggregateDescriptorFactory

## Methods

### Add(System.Linq.Expressions.Expression)

Specifies member on which aggregates to be calculated.

#### Parameters

##### expression - `System.Linq.Expressions.Expression<Func>`

The Aggregates set for the DataSource

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Min();
                    })
            )
             
```

### Add(System.String,System.Type)

Specifies member on which aggregates to be calculated.

#### Parameters

##### memberName - `System.String`

The member name.

##### memberType - `System.Type`

The member type.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.
