public List <OrderHistoryViewModel> GetOrderHistory(int ID)
        {
            var orders = orderRepository.GetAllByUserID(ID);
            List <OrderHistoryViewModel> orderHistoryList = new List <OrderHistoryViewModel>();

            foreach (var order in orders)
            {
                List <OrderDetail> orderDetails = orderDetailRepository.GetAllByOrderID(order.OrderId);

                OrderHistoryViewModel orderHistory = new OrderHistoryViewModel()
                {
                    OrderID      = order.OrderId,
                    CustomerName = "",
                    Status       = "shipped",
                    NoOfProducts = orderDetails.Count,
                    Total        = (decimal)order.TotalAmount,
                    DateAdded    = order.DateCreated.ToString()
                };
                orderHistoryList.Add(orderHistory);
            }
            return(orderHistoryList);
        }