Ejemplo n.º 1
0
        public IActionResult Create(BrandViewModel model)
        {
            if (ModelState.IsValid)
            {
                ProductBrand brand = _mapper.Map <BrandViewModel, ProductBrand>(model);


                _departmentRepository.CreateBrand(brand);

                return(RedirectToAction("index"));
            }

            return(View(model));
        }