public async Task <IActionResult> Update(int id) { var category = await _categoryApiService.GetAsync(id); await _categoryApiService.Update(category); //return RedirectToAction("Index"); return(View(category)); }
public async Task <IActionResult> Update(CategoryDto categoryDto) { // _categoryService.Update(_mapper.Map<Category>(categoryDto)); await _categoryApiService.Update(categoryDto); return(RedirectToAction("Index")); }
public async Task <IActionResult> Update(CategoryDto categoryDto) { if (ModelState.IsValid) { await _categoryApiService.Update(categoryDto); return(RedirectToAction("Index")); } return(View(categoryDto)); }
public async Task <IActionResult> Update(CategoryDto categoryDto) { await _categoryApiService.Update(categoryDto); return(RedirectToAction("Index")); }