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