示例#1
0
        public async Task <IActionResult> Create(CreateOrUpdateCategoryViewModel model)
        {
            if (ModelState.IsValid)
            {
                var result = await _articleCategoryService.CreateOrUpdateCategoryAsyc(Mapper.Map <CreateOrUpdateCategoryDto>(model));

                return(Redirect(nameof(Index)));
            }

            return(View(model));
        }