示例#1
0
        public void SeedContent()
        {
            ICar eCarOne = new ElectricCar(101, "Tesla", "Model S", 2019, 5000.05);

            _carRepository.AddCarToList(eCarOne);
            ICar eCarTwo = new ElectricCar(102, "Tesla", "Model 3", 2019, 4500.05);

            _carRepository.AddCarToList(eCarTwo);
            ICar gCarOne = new GasCar(201, "Toyota", "Yaris", 2007, 175000);

            _carRepository.AddCarToList(gCarOne);
            ICar gCarTwo = new GasCar(202, "Chrysler", "Town & Country", 2012, 105000);

            _carRepository.AddCarToList(gCarTwo);
            ICar hCarOne = new HybridCar(301, "Toyota", "Prius C", 2014, 65000.50);

            _carRepository.AddCarToList(hCarOne);
            ICar hCarTwo = new HybridCar(302, "Toyota", "Prius L", 2019, 6874);

            _carRepository.AddCarToList(hCarTwo);
        }