public ActionResult Save(BrandInfoViewModel model) { var brandDto = new DtoBrand { Id = model.Id, Name = model.Name }; _brandService.SaveBrand(brandDto); return(RedirectToAction("Index")); }
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)); }