Ejemplo n.º 1
0
        public async Task CreateInvoice(string customerId, string rentalId)
        {
            Invoice invoice = new Invoice(new InvoiceId(), new CustomerId(customerId));

            invoice.SetRental(new RentalId(rentalId));

            await _eventRepository.SaveAsync(invoice);

            await _customerRepository.AddInvoice(customerId, invoice.Id.ToString());
        }