Esempio n. 1
0
        private InvoiceDomain Aggregate(InvoiceEntity entity)
        {
            return(entity.ToDomain(
                       entity.ItemsRefs.Select(item => _itemRepository.FindById(new SimpleObjectIdentifier(item))).ToList(),
                       entity.PaymentsRefs.Select(payment => _paymentRepository.FindById(new SimpleObjectIdentifier(payment))).ToList(),
                       _supplierRepository.FindById(new SimpleObjectIdentifier(entity.SupplierRef)),
                       _receiverRepository.FindById(new SimpleObjectIdentifier(entity.ReceiverRef))

                       ));
        }
 public EntityReceiverDto GetById(IObjectIdentifier <ulong> id) => EntityReceiverDto.FromDomain(_repository.FindById(id));