//to place order directly from a product

        public ActionResult CreateFromProduct(int Id)
        {
            Product product = new Product();

            DisplayDbData.GetProductById(product, Id);
            ViewBag.Product = product;
            return(View());
        }
        // GET: ProductController/Edit/
        public ActionResult Edit(int Id)
        {
            try
            {
                var product = DisplayDbData.GetProductById(new Product(), Id);
                ProductCharacteristics productCharacteristics = new ProductCharacteristics();
                DisplayDbData.DisplayProductCharacteristics(productCharacteristics);
                ViewBag.ProductCharacteristics = productCharacteristics;
                return(View(product));
            }
            catch (Exception)
            {
                ViewBag.Message = "Product not found";
                return(RedirectToAction(nameof(Index)));

                throw;
            }
        }