Esempio n. 1
0
        public EntitySupplierDto Delete(IObjectIdentifier <ulong> id)
        {
            var supplier = _repository.FindById(id);

            _repository.Delete(supplier.Id);
            return(EntitySupplierDto.FromDomain(supplier));
        }
 public static InvoiceDto FromDomain(Invoice invoice)
 {
     return(new InvoiceDto(
                invoice.Id,
                invoice.IssueDate,
                invoice.DueDate,
                invoice.RedemptionDate,
                invoice.Items.Select(InvoiceItemDto.FromDomain).ToList(),
                invoice.Payments.Select(InvoicePaymentDto.FromDomain).ToList(),
                EntitySupplierDto.FromDomain(invoice.Supplier),
                EntityReceiverDto.FromDomain(invoice.Receiver)
                ));
 }
Esempio n. 3
0
 public EntitySupplierDto GetById(IObjectIdentifier <ulong> id) => EntitySupplierDto.FromDomain(_repository.FindById(id));