Exemplo n.º 1
0
        public IActionResult AddProductToDiscount()
        {
            var vm = new DiscountAddProductViewModel();

            vm.DiscountsName = new SelectList(_sqlDiscount.ListDiscount().Select(d => d.Name));
            vm.ProductsName  = new SelectList(_sqlProduct.GetProducts().Select(d => d.Name));

            return(View(vm));
        }
Exemplo n.º 2
0
        public IActionResult GetAllProducts()
        {
            List <Product> p = _sqlProduct.GetProducts();

            return(View(p));
        }