| 1234567891011121314151617181920 | using System;using System.Collections.Generic;using System.Linq.Expressions;using InABox.Core;namespace Comal.Classes{    public class TotalStockAggregate : CoreAggregate<Product, StockMovement, double>    {        public override Expression<Func<StockMovement, double>> Aggregate => x => x.Qty;        public override Dictionary<Expression<Func<StockMovement, object>>, Expression<Func<Product, object>>> Links =>            new Dictionary<Expression<Func<StockMovement, object>>, Expression<Func<Product, object>>>()            {                { StockMovement => StockMovement.Product.ID, Product => Product.ID }            };        public override AggregateCalculation Calculation => AggregateCalculation.Sum;    }}
 |