1234567891011121314151617181920212223 |
- using System;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class ProductIssuedAggregate : CoreAggregate<Product, StockMovement, DateTime>
- {
- public override Expression<Func<StockMovement, DateTime>> Aggregate => x => x.Date;
- public override Filter<StockMovement> Filter =>
- new Filter<StockMovement>(x => x.Issued).IsNotEqualTo(0.0F).And(x => x.IsTransfer).IsEqualTo(false);
- 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.Maximum;
- }
- }
|