Beispiel #1
0
        public ActionResult Save(BrandInfoViewModel model)
        {
            var brandDto = new DtoBrand {
                Id = model.Id, Name = model.Name
            };

            _brandService.SaveBrand(brandDto);

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult Edit(int brandId)
        {
            var brand = _brandService.GetBrand(brandId);
            var model = new BrandInfoViewModel {
                Id = brand.Id, Name = brand.Name
            };

            ViewBag.Title = "Редактирование марки автомобиля";

            return(View(model));
        }