// GET: Cars/Create public IActionResult Create() { var carSetViewModel = new CarSetViewModel { Producers = _context.Producers.ToList(), Car = new Car(), }; return(View(carSetViewModel)); }
// GET: Cars/Edit/5 public IActionResult Edit(Guid id) { var car = _carService.Get(id); var vm = new CarSetViewModel { Car = car, Id = car.Id, Producers = _context.Producers.ToList(), }; return(View(vm)); }