Exemple #1
0
        public async Task <IActionResult> Index()
        {
            IndexViewModel indexViewModel = new IndexViewModel()
            {
                MenuItem    = await _menuItemService.FindAllWithIncludesAsync(),
                Category    = await _categoryService.FindAllAsync(),
                SubCategory = await _subCategoryService.FindAllAsync(),
                Coupon      = await _couponService.GetAllCouponsIsActiveAsync()
            };

            return(View(indexViewModel));
        }
Exemple #2
0
        //GET: /<controller>/
        public async Task <IActionResult> Index()
        {
            var subcategories = await _subCategoryService.FindAllAsync();

            return(View(subcategories));
        }