public async Task <IActionResult> Add(BrandModel model) { if (ModelState.IsValid) { var isSaved = await _brandManager.SaveBrand(model); if (isSaved) { return(RedirectToAction("List")); } } return(View(model)); //TODO: view with validation errors }
public async Task <IActionResult> Add(BrandModel model) { if (ModelState.IsValid) { var isSaved = await _brandManager.SaveBrand(model); if (isSaved) { return(RedirectToAction("List")); } } return(View(model)); //TODO: view with validation errors }