| 12345678910111213141516171819202122232425 | using Comal.Classes;namespace Comal.Stores{    internal class InvoiceReceiptStore : BaseStore<InvoiceReceipt>    {        protected override void BeforeSave(InvoiceReceipt entity)        {            base.BeforeSave(entity);            //UpdateAggregate<Invoice>(entity, entity.InvoiceLink, Sum<Invoice>(ir => ir.Amount, i => i.AmountPaid));            //UpdateAggregate<Receipt>(entity, entity.ReceiptLink, Sum<Receipt>(ir => ir.Amount, r => r.Total));        }        protected override void BeforeDelete(InvoiceReceipt entity)        {            base.BeforeDelete(entity);            //entity.InvoiceLink.ID = Guid.Empty;            //UpdateAggregate<Invoice>(entity, entity.InvoiceLink, Sum<Invoice>(ir => ir.Amount, i => i.AmountPaid));            //entity.ReceiptLink.ID = Guid.Empty;            //UpdateAggregate<Receipt>(entity, entity.ReceiptLink, Sum<Receipt>(ir => ir.Amount, r => r.Total));        }    }}
 |