DataBaseExecutors.Aggregation NamespaceDataBaseExecutors
Execute DataTable aggregation.
Classes

  ClassDescription
Public classAbsAggregatable
Abstract Class for Aggregatable Class
It's designed to convert Json.
Public classDataAggregator
The class for aggregating DataTable.You can get List of class with subtotal items.
Caution:You have to sort DataTable before aggregation.

The Aggregation rule is defined in AbsAggregatable. So If you want to execute aggregate,there are 2 steps.
1.Make class that inherits AbsAggregatable and implements MustOverride.

1.1 Implements createInstance : conversion for DataRow to class instance.
1.2 Implements MakeId/MakeCaption : Make id for each depth (For Example, depth 0 is Month , 1 is Customer and Material ... larger depth is more detail ).
1.3 Implements Aggregate : Implements aggregation process

2.Create instance of DataAggregator and execute Aggregate(Of your_class)
Aggregate's result is List(Of your_class) that includes aggregated(subtotal) record.

Aggregation is executed by below process

1. Split DataTable by id. Id is made by MakeId and it depends on depth.
2. Aggregate each DataTable by Aggregate(that is implemented in AbsAggregatable ).
3. Merge Aggregated DataTables.

Note:For split the DataTable, you have to sort DataTable before Aggregation.