public ActionResult Submit(SubmitOrderModel model)
        {
            var orderRepository = new OrderRepository();
            var order = new Order();
            order.Email = model.Email;
            foreach (var orderedDish in model.Dishes)
            {
                if (orderedDish.Quantity > 0)
                {
                    order.AddOrderDetail(orderedDish.Id, orderedDish.Quantity);
                }
            }

            var orderId = orderRepository.Save(order);

            return Json(new { orderId, confirmLink = Url.Action("Confirm", new { id = orderId }) });
        }
        public ActionResult Confirm(int? id)
        {
            var orderRepository = new OrderRepository();

            if (id == null)
            {
                return View();
            }

            var order = orderRepository.GetById(id.Value);

            if (order == null)
            {
                return View();
            }

            return View(order);
        }
 public ActionResult Index()
 {
     var repo = new OrderRepository();
     var pendingOrders = repo.GetPendingOrders();
     return View(pendingOrders);
 }