Ejemplo n.º 1
0
        public IActionResult GetInvoice(int id)
        {
            var order   = OrdersRepo.Get(id);
            var invoice = InvoiceGenerator.GenerateInvoice(order, FeeRepository.Get());

            return(new FileContentResult(Encoding.UTF8.GetBytes(invoice), InvoiceGenerator.MediaType));
        }
Ejemplo n.º 2
0
 public IEnumerable <OrderDto> Get()
 {
     return(OrdersRepo.Get(CustomersRepository.GetCurrentCustomer()).Select(o => o.ToOrderDto(FeeRepository.Get())));
 }