Ejemplo n.º 1
0
 public IList <Billing> CreateBilling(TriggerOrder triggerOrder, Company company)
 {
     return(triggerOrder
            .Triggers
            .Select(trigger => new Billing(trigger.Money, company.Identifier))
            .ToList());
 }
        public IList <Billing> CreateBilling(TriggerOrder triggerOrder, Company company)
        {
            var sumValue = triggerOrder
                           .Triggers
                           .Select(trigger => trigger.Money)
                           .Aggregate(Money.Zero(company.Balance.Currency), (acc, money) => acc + money);

            return(new List <Billing>
            {
                new Billing(sumValue, company.Identifier)
            });
        }