예제 #1
0
        public async Task <IActionResult> Update(CategoryUpdateModel model)
        {
            if (ModelState.IsValid)
            {
                await _categoryApiService.UpdateAsync(model);

                return(RedirectToAction("Index"));
            }
            return(View(model));
        }
예제 #2
0
        public async Task <IActionResult> Update(CategoryUpdateModel categoryUpdateModel)
        {
            TempData["active"] = "category";
            if (ModelState.IsValid)
            {
                await _categoryApiService.UpdateAsync(categoryUpdateModel);

                return(RedirectToAction("Index"));
            }
            return(View(categoryUpdateModel));
        }