// GET: Order/History public async Task <IActionResult> History() { IEnumerable <OrderHistoryDto> orderHistory = null; try { orderHistory = await _orderFacade.GetOrders(1); /*orderHistory = await _orderFacade.GetOrders(customerId);*/ } catch (HttpRequestException) { _logger.LogWarning("Exception Occured using Order Facade"); orderHistory = null; } IEnumerable <OrderHistoryViewModel> viewModel = orderHistory.Select(o => new OrderHistoryViewModel { OrderId = o.OrderId, Date = o.Date, TotalPrice = o.TotalPrice, }); return(View(viewModel)); }
public IEnumerable <OrderDto> Get() { return(_orderFacade.GetOrders()); }