public ActionResult AddItem(ItemDetailViewDetail item)
        {
            if (ModelState.IsValid)
            {
                // TODO: Get product and order from repositories using view model properties, and add product to order, then redirect to order detail
                Order order = orderRepository.Get(item.Id);
                Product product = productRepository.Get(item.OrderLineItemProductName);

                order.AddOrderLineItem(product, item.OrderLineItemQuantity);

                return RedirectToAction("OrderDetail", new { id = item.Id });
            }
            else
            {
                // TODO: update view model with products data and return View with view model
                ItemDetailViewDetail idvm = new ItemDetailViewDetail
                {
                    Id = item.Id,
                    ProductList = new SelectList(
                        productRepository.GetAll(),
                        "Name",
                        "name")
                };
                return View(idvm);
            }
        }
 public ActionResult AddItem(int? id)
 {
     if (id == null)
     {
         return View("Index");
     }
     else
     {
         ItemDetailViewDetail idvm = new ItemDetailViewDetail
         {
             Id = id.Value,
             ProductList = new SelectList(
                 productRepository.GetAll(),
                 "Name",
                 "name")
         };
         return View(idvm);
     }
     // TODO: create view model for form and return View with view model
 }