Exemplo n.º 1
0
        public IActionResult Product(int id)
        {
            Product          product     = productContainer.GetByID(id);
            ProductViewModel productView = ProductMapper.ProductViewModel(product);

            return(View(productView));
        }
Exemplo n.º 2
0
        public IActionResult AddProduct(int aantal, int productId)
        {
            int orderId = GetSessionOrderId();

            Order      order      = orderContainer.GetByID(orderId);
            Product    product    = productContainer.GetByID(productId);
            OrderRegel orderRegel = new OrderRegel(aantal, product);

            order.EditOrderRegel(orderRegel);

            ProductViewModel productView = ProductMapper.ProductViewModel(product);

            return(RedirectToAction("Product", "Products", productView));
        }