Esempio n. 1
0
        public IActionResult Catalog(Departments dep)
        {
            Departments    department = (Departments)dep;
            List <Product> products   = db.Products.GetAll().Where(p => p.Department == department).
                                        OrderBy(p => p.Type).ToList();

            ViewBag.Dep = dep.ConvertToString();
            return(View(products));
        }