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)); }
public IActionResult Index() { List <Product> products = _productBs.GetAll(); return(View(products)); }