Пример #1
0
        public async Task <IActionResult> Create()
        {
            var category     = new CodeMasterModel();
            var categoryList = await _categoryMasterData.GetCategoryList(null);

            categoryList.ForEach(x =>
            {
                category.CategoryList.Add(item: new SelectListItem {
                    Value = x.CATEGORY_ID, Text = x.CATEGORY_DESCR
                });
            });

            return(View(category));
        }
Пример #2
0
        public async Task <IActionResult> Index(string?categoryId)
        {
            var categoryList = await _categoryMasterData.GetCategoryList(categoryId);

            return(View(categoryList));
        }