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