Exemplo n.º 1
0
        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
        }