Exemple #1
0
        public ActionResult Product()
        {
            List <ProductListVM> list = _ps.GetAll()
                                        .Where(x => x.IsActive == true)
                                        .OrderByDescending(x => x.Created)
                                        .Select(x => new ProductListVM()
            {
                Id           = x.Id,
                BrandName    = x.BrandName,
                Model        = x.Model,
                Serial       = x.Serial,
                WorkHeight   = x.WorkHeight,
                WorkCapacity = x.WorkCapacity,
                Periodic     = x.Periodic,
                State        = x.State,
                Description  = x.Description
            }).ToList();

            return(View(list));
        }
Exemple #2
0
        public IActionResult Index()
        {
            List <Product> products = _productBs.GetAll();

            return(View(products));
        }