public IViewComponentResult Invoke(int id)
        {
            EfFoodDal foodDal = new EfFoodDal();
            var       result  = foodDal.GetAll(x => x.CategoryId == id);

            return(View(result));
        }
Exemple #2
0
        public IViewComponentResult Invoke()
        {
            EfFoodDal foodDal = new EfFoodDal();
            var       result  = foodDal.GetAll();

            return(View(result));
        }
Exemple #3
0
        public IActionResult Index(int page = 1)
        {
            var result = foodDal.GetAll("Category").ToPagedList(page, 3);

            return(View(result));
        }