コード例 #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));
        }
コード例 #2
0
        //GET: /<controller>/
        public async Task <IActionResult> Index()
        {
            var subcategories = await _subCategoryService.FindAllAsync();

            return(View(subcategories));
        }