public async Task <IActionResult> Create(CategoryAddModel model) { TempData["active"] = "category"; if (ModelState.IsValid) { await _categoryApiService.AddAsync(model); } return(View(model)); }
public async Task <IActionResult> Create(CategoryAddModel model) { if (ModelState.IsValid) { await _categoryApiService.AddAsync(model); return(RedirectToAction("Index")); } return(View(model)); }
public async Task <IActionResult> Create(CategoryAddModel categoryAddModel) { TempData["active"] = "category"; if (ModelState.IsValid) { await _categoryApiService.AddAsync(categoryAddModel); return(RedirectToAction("Index")); } return(View(categoryAddModel)); }