Esempio n. 1
0
        public async Task <Domain.InvoiceManagement.Invoice> UpdateAsync(Domain.InvoiceManagement.Invoice existingDomainInvoice)
        {
            DataModels.InvoiceManagement.Invoice dataInvoice = _dataModelInvoiceMapper.Map(existingDomainInvoice);

            var invoiceDocument = await _genericRepo.UpdateAsync(dataInvoice.Id, dataInvoice);

            Domain.InvoiceManagement.Invoice domainInvoice = _domainInvoiceMapper.Map(invoiceDocument);

            return(domainInvoice);
        }
Esempio n. 2
0
        public async Task <Domain.InvoiceManagement.Invoice> AddAsync(Domain.InvoiceManagement.Invoice newDomainInvoice)
        {
            DataModels.InvoiceManagement.Invoice dataInvoice = _dataModelInvoiceMapper.Map(newDomainInvoice);

            dataInvoice = await _genericRepo.CreateAsync(dataInvoice);

            Domain.InvoiceManagement.Invoice domainInvoice = _domainInvoiceMapper.Map(dataInvoice);

            return(domainInvoice);
        }