예제 #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));
        }
예제 #2
0
 public IEnumerable <OrderDto> Get()
 {
     return(OrdersRepo.Get(CustomersRepository.GetCurrentCustomer()).Select(o => o.ToOrderDto(FeeRepository.Get())));
 }