Beispiel #1
0
        public IActionResult AddCar(string brand, string regNr, string carModel, int carTypeId)
        {
            var newCar = new Car {
                CarBrand = brand, RegNr = regNr, CarModel = carModel, CarTypeId = carTypeId
            };

            _carRepository.AddCarToDb(newCar);
            return(RedirectToAction("Index", "Car"));
        }